bash
Nothing to display jet.
Nothing to display jet.
Use this script to control the LEDs on your Pogoplug with Arch Linux ARM. More under the cut
pushpath () { export PATH=${PATH}:${1}; }
Never thought about it untill I saw @pspeter3 post about it. More under the cut
function add-alias() {
echo "alias $1=\"${@:2:$#}\"" >> ~/.bashrc;
source ~/.bashrc;
}
find . -name ".svn" -exec rm -rf {} \;
#svn #bash via:http://www.commandlinefu.com/commands/view/902/delete-all-.svn-directories-from-current-path-recursive
Here is the task.
I've got two directories: A and B (two versions of a same library).
I need to list all the files in A where git diff between file from A and from B is longer than 2 lines.
What is the cleanest way of doing this in #bash?
#Bash? #Metaprogramming? WTF? Turns out, bash's everything-is-a-string philosophy makes it pretty awesome for metaprogramming. More under the cut
Today I was playing with man program and I discovered how man's colored text is transmitted to the less program.
Note: man doesn't use escape sequences to communicates its colors. More under the cut
To sniff the data sent and received from a host. Run the following command.
mkfifo pipe
tty=`tty`; nc -l -p 1234 < pipe | tee $tty | nc $host $port | tee pipe
Configure your program to communicate with localhost:1234 and run it.
All the data exchanged will be outputted to the terminal.
Note that on OS X, the nc -l option does not require the -p.
Mine are:
g for git s for sublime p for navigating to project, thanks to @kirs, source cpd for cap production deploy csd for deploying staging More under the cut
I don't want to write tons of text, just look at my new aliases:
alias .='mvim .'
alias ,='git'
Usually I use one–letter aliases like b for bundle or g for rails generate. I really dislike stuff like gst for git status or rdbm for rails db:migrate: too much letters and no sense (as for me). So, I like my new aliases, they are short enough.
#shell #bash #ruby #osx #unix #linux #zsh #alias #awesome #incredible
Here is the code: More under the cut