Posts

Showing posts from March, 2017

sqllite commandline history via up/down keys

I found very annoying problem with sqlite CLI. When you press up/down arrow keys, it prints ASCI characters of the keys rather that showing historical commands. When I googled, I realised that we can either link readline library when compiling sqlite or do: sudo apt-get install rlwrap rlwrap sqlite3 database.db worked like a charm for me.

increasing brightness on LXDE display on lubunut

LXDE seems to have 2 brightness controls. Both of them are found in locations:  /sys/class/backlight/ For me it was : harsshal@dell:~$ ll /sys/class/backlight/   lrwxrwxrwx  1 root root 0 Mar 18 12:58 acpi_video0 -> ../../devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/ lrwxrwxrwx  1 root root 0 Mar 18 12:58 intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/ Both locations have max_brightness file : harsshal@dell:~$ ll /sys/class/backlight/ */max_brightness   -r--r--r-- 1 root root 4096 Mar 18 12:58 /sys/class/backlight/acpi_video0/max_brightness -r--r--r-- 1 root root 4096 Mar 18 12:58 /sys/class/backlight/intel_backlight/max_brightness harsshal@dell:~$ cat /sys/class/backlight/*/max_brightness  7 255000 So typically intel_backlight will be controlled by all your default brightness controller, but acpi_video0 will need manual changes when you need to change it: hars...

startup scripts in windows to keep screen active

I wrote a script to keep my comupter not get locked. script goes as follows: set WshShell = WScript.CreateObject("WScript.Shell") x = 1 do while x = 1 'Loop forever and ever and ever and ever WshShell.SendKeys "%^" 'SEND CTL + ALT WScript.Sleep 290000 ' I placed this script at location C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup and no more locking up the screen....