Skip to content

Instantly share code, notes, and snippets.

@cajun-code
cajun-code / related_models.py
Created May 12, 2011 14:31 — forked from dsibilly/related_models.py
SQLAlchemy related models demo
@cajun-code
cajun-code / migration.rb
Created May 18, 2011 18:28 — forked from serek/migration.rb
Migration from attachment_fu to paperclip.
class ConvertImagesToPaperclip < ActiveRecord::Migration
include PaperclipMigrations
def self.up
# Paperclip
add_column :images, :data_file_name, :string
add_column :images, :data_content_type, :string
add_column :images, :data_file_size, :integer
add_column :images, :data_updated_at, :datetime
@cajun-code
cajun-code / gist:994142
Created May 26, 2011 21:36 — forked from Gregg/gist:968534
Code School Screencasting Framework

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this screencast if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent then a phone call or screen sharing.
@cajun-code
cajun-code / gist:1046107
Created June 25, 2011 03:31
rvm notes ubuntu 11.04
$ rvm notes
Notes for Linux ( DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.04
DISTRIB_CODENAME=natty
DISTRIB_DESCRIPTION="Ubuntu 11.04" )
NOTE: 'ruby' represents Matz's Ruby Interpreter (MRI) (1.8.X, 1.9.X)
This is the *original* / standard Ruby Language Interpreter
@cajun-code
cajun-code / settings.py
Created July 5, 2011 13:04
Append to settings.py and create local-settings.py
# Append to settings.py in the python app and create a local_settings.py
# override the database settings in local_settings
try:
from local_settings import *
except ImportError:
pass
@cajun-code
cajun-code / .bash_profile
Last active March 6, 2019 16:14
bash profile for rails development
source /usr/local/git/contrib/completion/git-completion.bash
complete -C "/usr/bin/gemedit --complete" gemedit
export WORKON_HOME=~/.env
export JAVA7_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home
export JAVA6_HOME=/Library/Java/Home
export JAVA_HOME=$JAVA6_HOME
export PATH=$JAVA_HOME/bin:$PATH
export SBT_OPTS="-XX:MaxPermSize=256M"
@cajun-code
cajun-code / rvm commands
Created May 30, 2012 23:31
rvm commands
sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev sqlite3 libsqlite3-dev libxml2-dev libxslt-dev autoconf curl libtool
curl -L get.rvm.io | bash -s stable
rvm pkg install openssl
rvm pkg install zlib
rvm pkg install readline
@cajun-code
cajun-code / redcar_rvm_setup
Last active October 10, 2015 11:07
Redcar Setup
rvm use 1.9.3@redcar --create
gem install redcar
rvm wrapper 1.9.3@redcar ruby redcar
mv ~/.rvm/bin/ruby_redcar ~/.rvm/bin/redcar
module PixenToGameQuery
require 'RMagick'
include Magick
FPR = 12 # Frames per row in a sprite sheet generated by Pixen
COLPAD = 2 # Pix between each column of images on the sprite sheet
ROWPAD = 2 # Pix between each row of images on the sprite sheet
LEFTPAD = 4 # Extra pix on left of sprite sheet
RIGHTPAD = 20 # Extra pix on right of sprite sheet
BOTTOMPAD = 2 # Extra pix on bottom of sprite sheet
@cajun-code
cajun-code / export_obj_c.py
Created December 22, 2012 19:43
Blender script for exporting models to objective c
#!BPY
"""
Name: 'Objective-C Header (.h)'
Blender: 244
Group: 'Export'
Tooltip: 'Exports header file for use with the OpenGL ES template for iPhone available from http://iphonedevelopment.blogspot.com/'
"""
import Blender
from Blender import *