According to Cordell

Useful Rails blog posts

A list of specific blog posts (not written by me) that I believe are helpful for a Rails developer:

Development

Ruby: Classes, Modules, and Mixins

Below is a short review of classes and modules. This post is written so I can cement these concepts for myself. The source material is Metaprogramming Ruby and is mainly a rephrasing of concepts from it. If you would like to understand more, I recommend the book.

Objects

Starting for the bottom, the most basic unit is, …

Ruby and Rails Book List

Read

Ruby Notes

Objects

Classes

  • Classes are instances of Class which is a subclass of Module
  • CamelCased

Instance Variables

  • Objects of the same class can have different sets of instance variables as they only exist upon assignment

Method calls

  • The object …

Cloning a larger linux OS hard drive to a smaller one

I needed to upgrade my linux server’s hard drive from a traditional HDD to a SSD. Unfortunately the old hard drive was 80 GB and the new one is 64 GB. There are commercial programs for this purpose but I figured I could do it with freeware. To that end, you will need:

  1. Linux live CD (anything with Gparted on it …

Building a better static page

In an effort to gain a better understand of the full stack in web development I tasked myself with improving my static pages. While I am concurrently learning web application development, I thought it would be beneficial to try and solve and better understand a static page. What follows are the simple tricks and tools …

Git Notes

Switch to remote branch

git fetch
git checkout -b **local** **remote/branch**

Merge branch back into master

git checkout master
git merge **branchname**

Delete remote branch

git push origin :**branchname**

Netatalk fix for Ubuntu 12.04

Ubuntu 12.04 breaks netatalk and when you try to login in to the apple share you will get errors such as this in /var/log/syslog:

Jun 14 13:03:13 GlaDoS afpd[4395]:
===============================================================
Jun 14 13:03:13 GlaDoS afpd[4395]: INTERNAL ERROR: Signal 11 in pid 4395 (2.2.1)
Jun 14 …

Stopping mdadm assemble on ubuntu boot

Soft raid setup with mdadm

I have a Raid-6 running and it currently has 6 drives. My Mobo has 6 sata ports, one of which is used up for the boot drive (not involved in the array). The sixth array drive is on a PCI sata/raid card. The server is headless, which is important because I do not want degraded array events to …

Rails notes

Create a controller without tests.

rails generate controller {controller name} {views/methods} --no-test-framework

Create integration test

rails generate integration_test {test_name}

Roll back a migration

rake db:rollback

Rspec test for Mass Assign Vulnerbility (or attribute not being accessible):

describe …

Pages