worked like a charm for me.sudo apt-get install rlwraprlwrap sqlite3 database.db
Sunday, March 26, 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:
Saturday, March 18, 2017
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 7255000
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:
harsshal@dell:~$ echo 7 | sudo tee /sys/class/backlight/acpi_video0/brightness 7
Other methods of increasing brightness :
harsshal@dell:~$ xbacklight -set 60
Or
harsshal@dell:~$ xrandr -q | grep -w connectedLVDS-1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 290mm x 180mmharsshal@dell:~$ xrandr --output LVDS-1 --brightness 1
Wednesday, March 1, 2017
startup scripts in windows to keep screen active
I wrote a script to keep my comupter not get locked. script goes as follows:
and no more locking up the screen....
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 '<5 MINS
loop
I placed this script at location
C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
and no more locking up the screen....
Subscribe to:
Posts (Atom)
Loading .bas file in excel
* Ctrl + Break to stop Macro / Alt + F8 to run "stop function" * Alt + F11 to open VBA editor * Remove old bas and import new bas ...
-
I have 64 bit ubuntu in office and for some strange reasons, it installs 32 bit flash player through apt-get. To install 64 bit version here...
-
Better than opening in 2 VIM windows , I used to take diff and open its output in vim :). But diff itself has flag which will compare files ...
-
This is how we use a command line / bash variable (named num) in a awk command. We define an awk variable 'var' with -v option. Th...