programming Archives - Page 2 of 4 - Ravi Desai

Automatically start rails server with upstart

The following is how to set up an Upstart file so you can have a rails application autostart upon the startup of a server. Modify the “USERNAME” and “TAG_FOR_THIS_PROCESS_IN_SYSLOG” fields to something that you want. It will run the server as the user you declare, so that the server isn’t run as the root user […]

Docker and Torquebox

My OVH box went down a few weeks ago and refused to get back up. I couldn’t even ssh in. No clue why. On the bright side, I got to use this as an opportunity to learn more about keeping things fail-safe. I’d say “more fail-safe”, but apart from github for my source-code, nothing was […]

Update to JParallel

I began the JParallel library a little while ago (Right after the post about not doing my own parallel programming (It doesn’t make a lot of sense)), and nearly immediately got a response from Mohamed Hafez on the issue tracker recommending I add a bunch of features. And a week later he implemented things in […]

Do not do raw parallel programming

I previously had a blog post on thread-safe programming, where I said I wanted to do it, and that I know how mutexes work and I should start from there. That post has been wiped off the face of my blog. I’m not going to do low-level parallel programming for the foreseeable future. I came […]

Ruby: Select random element from array

This is a cool little trick I picked up from StackOverflow. Select random element of an array [:foo, :bar].sample Its the Array#sample instance method. Good to know.

Moneris payments from wordpress

I had a wordpress subcontract the other day for a site thats mostly built up. My job was to make sure payments were going through the Moneris payment host. I’d never done anything like that before. Fun stuff. The first problem I ran into was that Moneris didn’t have publicly accessible documentation for their API. […]

Web scraping in unix

I don’t recall why I was looking into web scraping a few weeks ago, but I felt the need for it. I always wondered how this works, and its basically a lot of regexps. Fun stuff. It gives me a great opportunity to brush up on my regexp-knowledge. Tools Curl For unix systems, just use […]

Inquiry cart plugin for WordPress

Update: 1-Feb-2014 I’ve been receiving requests for updating this plugin for WP for over a year now. I don’t work with WordPress anymore. I now program in Ruby, mostly with Ruby on Rails. I would highly recommend every WordPress dev do the same. Life is better on this side of the fence. WordPress is a […]

Tutorial for Hunchentoot

I’ve been in the dark for a while. I’m unable to decide on a course of action w.r.t. (With regards to) programming. Android is a mess right now since I don’t know enough Java, and the emulator for the devices is way to slow on my computer. So while I’m learning javascript through CodeAcademy, I’m […]

So many things to do, so little time

I’ve not updated this blog in a few months now. I was actually surprised about that myself. Its been busy, to say the least. Toronto Free Net I’ve been volunteering at the Toronto Free Net and they’ve had me working on some shell scripts for system administration. It is a lot of fun, and I’m […]