user@host:~/dotfiles$ cat create_bash_links.sh #!/bin/bash # # Creates symlinks in ~ to the bash files in this folder # SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" ln -svi ${SCRIPTPATH}/bashrc ~/.bashrc ln -svi ${SCRIPTPATH}/bash_profile ~/.bash_profile ln -svi ${SCRIPTPATH}/bash_aliases ~/.bash_aliases
How to check IP of installed printer on Mac
Open Terminal and run:
cupsctl WebInterface=yes
Open Safari and go to: http://localhost:631/printers. Here you can click on the printer name and see more specifications such as the IP address used.
Open Terminal and run:
cupsctl WebInterface=no
(Thanks to some useful tips at http://apple.stackexchange.com/questions/198037/how-do-i-get-the-actual-ip-address-of-a-printer-in-osx-yosemite)
Using Xcode’s FileMerge as diff tool for Subversion
- Install Xcode (needed to get FileMerge, which is used by fmdiff)
- Install http://www.defraine.net/~brunod/fmdiff/
- alias svndiff=”svn diff –diff-cmd=fmdiff”
About Bash (bashrc/profile files, useful aliases and functions)
The bash files
/bin/bash – The bash executable
/etc/profile – The systemwide initialization file, executed for login shells
/etc/bash.bashrc – The systemwide per-interactive-shell startup file
/etc/bash.bash.logout – The systemwide login shell cleanup file, executed when a login shell exits
~/.bash_profile – The personal initialization file, executed for login shells
~/.bashrc – The individual per-interactive-shell startup file
~/.bash_logout – The individual login shell cleanup file, executed when a login shell exits
~/.inputrc – Individual readline initialization file
Useful bash aliases and functions:
http://xmodulo.com/useful-bash-aliases-functions.html
http://teohm.com/blog/2012/01/04/shortcuts-to-move-faster-in-bash-command-line/
http://www.catonmat.net/blog/bash-vi-editing-mode-cheat-sheet/
Getting started with Raspberry Pi B+
The complete guide to setting up the Raspberry Pi B+ model with Raspbian and Wireless network. Continue reading “Getting started with Raspberry Pi B+”
Finder shortcut for creating a new empty file
Every now and then, for various reasons, I find myself wanting to add a new empty file to a folder. In the Windows world this is easily done through the context menu, i.e. right click→New→Text Document, but I didn’t have any neat way of doing it in Mac OS X Finder (without opening up Terminal to run “touch newfile”) – until I found this: http://www.codium.co.nz/touch%5Fhere%5Fapp/.
It works really well! For times when I want to have a bit more of “text beauty” I can create a file, open it in TextEdit and simply convert to Rich Text.
Remove duplicate Waze contacts on Android
The other day I noticed that my contacts where duplicated by Waze (on Android). This describes how to fix it and easily remove the duplicates. Continue reading “Remove duplicate Waze contacts on Android”
How to take screenshots in Android 4
Apparently there are different ways of how to take screenshots in Android, this describes some of them.
In Android 4.4 on Samsung: Press the Power and Home (hard) button simultaneously and keep them pressed for a moment.
On HTC: Press the Volume Down and Power buttons simultaneously and keep them pressed for a moment.
Clearing cached recipient addresses in Mac OS X Mail
In Mail, choose Window → Previous Recipients. Mark the ones of interest and press Remove From List.