Joined July 2011

Gaveen Prabhasara

Chaotic at Mekula
Sri Lanka

Posted to The single most useful thing in bash over 1 year ago

The first two lines are actually useful. But the last two things will get very annoying very fast, specially if you're used to working with a Unix-type CLI often.

Posted to Installing ruby 2.0.0 with RVM over 1 year ago

For Fedora/CentOS/RHEL the package should be: libyaml-devel

yum install libyaml-devel

$ netstat -tnlp is helpful too, which shows all programs (-p) listening (-l) on TCP (-t) ports in numeric format (-n). However I've found that 'netstat' can be unreliable on occasions, e.g., false negatives.

This is better way if you know the port number you want to check for. Alternatively you can use: $ lsof -i :1-65535 to check the full port range instead of just one. Or: lsof -i TCP:1-65535 to check only TCP ports.

+1 for what brombomb said. Only newer git versions require to 'source' the shipped with the git distribution (or source your own).

Posted to Programatically install Vim bundles over 1 year ago

Unless you have plugins with build/install stages, isn't this easier to do with git submodules? I do just that for my Vim setup and clone it from GitHub whenever I have to get my Vim environment.

Posted to Use VIM as your command line editor over 1 year ago

This actually set bash to use vi mode which emulates vi (not vim) commands, especially movement commands instead of the default emacs mode.

To use actual Vim instead, have: export EDITOR='vim' inside your preferred bash config file and press Ctrl + x Ctrl + e

More info here:

'ifconfig' is obsolete (according to its own man page). Since it could be going away in future, the use of 'ip' command is recommended. Therefore something like the following could be better.

ip addr | awk '$1 == "inet" && $2 != "" { split ($2, a, "/"); print a[1] }'

Posted to Reverse search your bash history over 1 year ago

Alternatively you could place in your ~/.inputrc the lines

"\e[A": history-search-backward

"\e[B": history-search-forward

This way you can type a partial command and press arrow keys to go through your history.

I'm personally against using aliases and what not instead of core command behaviours because mainly it screws up the muscle memory. Aliasing something like 'ls -d .* --color=auto' is one thing. But to alias the behaviour of a core Unix command usage like 'cd ..' just isn't worth it, IMO.

For me, to go back a directory level means 'cd ..' by instinct. It's not slower than typing '..' for all practical purposes if you get to use a command-line for any meaningful time (because it's become muscle memory) and works in every box with a Unix-like OS right away.

So no, for me at least. :) I use aliases mainly to shorten repetitive lengthy commands (a la script), or to avoid typos (Eg: alias lcd='cd').

Posted to Linux Touchpad On/Off over 1 year ago

@iberianpig I guess you are correct. I only remember a Dell laptop with an Alps touchpad which didn't seem to work with this. Ended up using another way. However, it seems people have been using synclient for that too:

Posted to Linux Touchpad On/Off over 1 year ago

Nice tip for people who doesn't have other methods (e.g.: DE settings, hardware button). Unfortunately works only with Synaptics touchpads.

32 Karma
891 Total ProTip Views