To help keep your Mac OSX desktop tidy, you may want to move your screenshots to a custom folder. Create a folder called Screenshots (or any name you like) in your desired location. For this article I am going to create Screenshots folder on the Desktop. Fire up a Terminal window and enter the following […]Read more "MacOSX – Change Default Save Location of Screenshots"
Sometimes while working on rails applications and running them on different ports, I end up getting ‘Address already in use’ error when starting a new application. Usually you can look for the processes with ps and grep the ones you are looking for. But if you are unable to find the process with ps or […]Read more "Address already in use errors – Find and kill process"
Lets say you want to check if port 1234 is open, run the following command in the terminal. nmap is not available on mac osx by default.You can install it with Homebrew, my preferred package manager for mac osx. Visit homebrew site for instructions on Homebrew installation. nmap -p 1234 localhost This will output the status […]Read more "Mac OSX – How to open a port"
When you want to recursively copy files from one directory to another, use find and pipe its output to cpio. find . -name ‘*.jpg’ | cpio -pdm /path/to/<dest_dir> This will find all files with extension ‘jpg’ and copy them to <dest_dir> directory. cpio -pdm copies files to destination directory and also creates the directory structure. […]Read more "Linux – Copy files recursively preserving directory structure"
rbenv is a great tool which enables you to install and pick a ruby version for your application. It is light weight and works by inserting a directory of shims at the front of the PATH Install Homebrew – a great package manager: ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)” Install rbenv – manage different versions on […]Read more "Install rbenv and ruby"
On your Mac, add following lines in ~/.irbrc require ‘irb/ext/save-history’ #History configuration IRB.conf[:SAVE_HISTORY] = 1000 This will enable irb history which will let you access previous commands with up/down keys The actual history resides under ~/.irb_historyRead more "Enable history in irb and rails console"
In case you have been wondering about the next release of Mac OSX, Apple has put up some details about the next member of the OSX family. The new born cub is called LION, Mac OS X Lion, Lion being 10.7 version of the Mac OS X clan. Interested to know more? Here are some […]Read more "Mac OS X – Lion"