Writing
Notes on building software — the decisions that age well, the ones that don't, and what I learn in between.
-
Parse for Links with Prototype JS
Parsing for links with the Prototype javascript library is easy. Here is the pattern for finding links And to implement it you can loop through your containers that might contain links
-
Add Users to a Group on Ubuntu
To create a new user on Ubuntu (Heron8) adduser johndoe To create a new group groupadd barleyfarmers Add johndoe to the barleyfarmers group adduser johndoe barleyfarmers The adduser command, when...
-
using screen
Use screen when you want to manage multiple sessions in a terminal. Install it on Ubuntu sudo apt-get install screen There are a lot of options for screen. I won't go into them. I use screen most...
-
paypal ipn simulator
If you use the Paypal sandbox you'll notice that there is an IPN Simulator test tool. You must be logged to use it. This tool lets you test an IPN handler script for your application. If your...
-
git checkout -- file-in-question.oh-my
Problem: using git and one file, like your db/schema.rb, is out of whack with the latest branch. If you run git pull and you get a failed merge and no update. You can of course, edit the conflicts...
-
rails fixtures: using the right timestamp
Fixtures in Rails allow you to quickly and easily populate a database with sample data. They are great when testing your app and you need to test against a condition that will rely on a certain...
-
the simple things with git
Git can track the file permissions on your source. This can be good, but for small projects on a webserver where permissions change from time to time, and permissions on development app don't match...
-
upgrading to latest phusion passenger 2.1.2
super easy will walk you through the install and remember to copy paths to your apache config file. for passenger i kept it in mods-available/passenger.conf and then linked it to mods-enabled then...
-
mysql on rails 2.3.2
mysql driver is no longer bundled w/ rails. you'll need to install it yourself w/ however, on ubuntu (heron) this won't work. issue these commands first if libmysqlclient-dev fails... try...
-
using rails paperclip plugin on ubuntu
paperclip is an awesome plugin for rails. it let's you attach an image to any of your models. installation and usage more information is available at...
-
Rails, SSL, Ubuntu, Apache2 with Phusion on Ubuntu
Here are all the commands for setting up your Rails application to server requests over SSL -on Ubuntu, of course. There are great resources and tutorials at these websites....
-
Setting up a new ubuntu server with apache2, php, ruby on rails, rubygems, mysql, and git
Here are a list of commands to get up and running with Apache2 with Phussion Passenger for Rails, PHP5, MySQL5, Ruby on Rails with Gems, and the source control software Git. I think that this is a...