Add to globals alias for log [alias] lg = log –graph –format=format:’%C(yellow)%h%C(reset) %C(red)- %an%C(reset) – %C(white)%s%C(reset) %C(bold yellow)%d%C(reset) %C(green)(%ar)%C(reset)’ –abbrev-commit […]
Category: Tools
Git: Log commits on working branch
To see only commits made on the working branch without all the clutter coming in from master, use git log […]
How to install Sphinx Doc and Create a new Project on OSX
Prerequisites Xcode Command Line tools Steps Run easy_install -U Sphinx (You might need to execute this command with root previllage) […]
Comparing zip and git versions of the same codebase
For a consulting project, I was given two versions of the same codebase: one as a zip file, one as […]
safe and sound faster blog commits on nanoc
Introducing nanoc I’ve tested various blogging platforms – from wordpress, throught blogger, tumblr or even custom CMS written by myself […]
GNU/Linux: time zone for a specific user
Sometimes we have account on GNU/Linux operating system that is located in a different time zone and its system-wide TZ […]
Resample Image to Size in Pixels With ImageMagick
Resizing to a maximum size in pixels can be tricky. I used to do this with a spreadsheet or a […]
See which Git command you use the most
Paste this into your terminal: history|grep git| awk ‘{CMD[$3]++;count++;}END { for (a in CMD)print CMD[a] ” ” CMD[a]/count*100 “% ” […]
Friendly Virus Reminder
In many ways, the new year is a celebration. For some people, it means time with family; for others, time […]
Installing libtorrent on Linux
Libtorrent by Rasterbar is a C++ BitTorrent library with Python bindings. Installing libtorrent for Python requires only one shell command […]
Sync iTunes via rsync to a NAS when it’s content changes
This script watches the iTunes folder for changes. As soon as something is changed iTunes will update the xml file. […]
Push all branches to all remotes
git push –all will push out all local branches to all remotes. This is extremely dangerous so use it with […]
log navigation with `less`
Ever need to read a file that is being appended to while reading it? The first command we usually learn […]
get ip address of SMB network machine
Given Mac’s on a local network, you can look up the IP by machine name using smbutil lookup machine_name The […]
Easter eggs in vim
Yes vim has this too… Thats what I have found: :help holy-grail :help 42 :help UserGettingBored
Open Vim: Learn Vim in Interactive Mode
If you don’t know about Vim, Vim is an advanced editor based UNIX that helps you editing your code faster. […]
How-to Git bisect
Let’s pretend you are working with collaborators in a project, and after a git pull you notice that the some […]
Use Curl to Login to a Site with Cookie Sessions
In “batch” (MS DOS) syntax curl “http://mysite.com/login” ^ –data-urlencode “rememberMe=true” ^ –data-urlencode “email=aturing@foobar.com” ^ –data-urlencode “password=secretpassword” ^ –cookie “cookies.txt” ^ […]
Making zsh compatible with rake
To make the rake corretamento work with zsh add this line in .zshrc file alias rake=”noglob rake” That’s it!
Removing special characters with sed
Using sed to remove special characters like – (HEX: 96): sed ‘s/x96/-/’ -i file.txt The -i flag will modify the […]