It is not very often but I do try out PHP and static html sites on my mac. But every time I try running apache server with applications under Sites folder, one or more issues pop up. So I thought I would write down the steps to get it working as it might help me or […]Read more "Set up Apache, PHP and Sites folder on Mac"
Recently I created a Rails 4 application and deployed it to an Ubuntu system using Capistrano. As I had to make few tweaks and try couple of options, I thought I should document the process here so I could refer to it later when needed. This post is for providing pointers on deploying Rails 4 […]Read more "Deploying Rails 4 app with Passenger and Apache using Capistrano, Rbenv"
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"
While working on one of our projects which uses SVN for version control, I had to merge in some changes from trunk to the branch. I did this as explained below: First checkout the branch where you want to merge revisions from trunk svn co http://svn_repo_url/project/branches/branch my_branch cd my_branch svn log -v –limit 100 # […]Read more "SVN – Merge trunk revisions into branch"
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"