This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Foo | |
class Railtie < Rails::Railtie | |
initializer "foo.insert_middleware" do |app| | |
app.config.middleware.use "Foo::Middleware" | |
end | |
end | |
end | |
require "foo/railtie" if defined? Rails |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put this in ~/.zshrc | |
chpwd() { | |
if [ -f ".env" ]; then source .env; fi | |
} | |
# Then make .env files in your project directories that look like this. | |
export S3_SECRET="<s3_secret>" | |
export S3_KEY="<s3_key>" | |
# Then add .env to ~/.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
188 cd | |
189 sudo apt-get remove ffmpeg x264 libx264-dev yasm | |
190 sudo apt-get update | |
191 sudo apt-get install build-essential git-core checkinstall texi2html libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev zlib1g-dev | |
192 cd | |
193 wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz | |
194 tar xzvf yasm-1.2.0.tar.gz | |
195 cd yasm-1.2.0 | |
196 ./configure | |
197 make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add speex, for Red5 | |
brew edit ffmpeg | |
args << "--enable-libspeex" if Formula.factory('speex').installed? | |
brew install --use-gcc ffmpeg | |
# H.264 / ACC | |
ffmpeg -i video.flv -acodec libfaac -ab 19k -ar 16000 -vsync 1 -async 1 -r 25.0 -b 193k -vcodec libx264 -s 420x340 video.mp4 | |
# VP8 / Vorbis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# On server | |
addgroup admin | |
adduser deployer --ingroup admin | |
# Locally | |
cat ~/.ssh/id_dsa.pub | ssh [email protected] 'mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo vim /etc/apt/sources.list | |
#add the following | |
deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse | |
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse | |
deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse | |
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse | |
deb http://archive.canonical.com/ lucid partner | |
sudo apt-get update | |
sudo apt-get install java-package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# /etc/init.d/red5 -- startup script for the red5 server | |
# | |
# Based on the tomcat6 init script. | |
# Written by Miquel van Smoorenburg <[email protected]>. | |
# Modified for Ubuntu red5 by Fred Dixon <[email protected]> | |
# Modified for Debian GNU/Linux by Ian Murdock <[email protected]>. | |
# Modified for Tomcat by Stefan Gybas <[email protected]>. | |
# Modified for Tomcat6 by Thierry Carrez <[email protected]>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Example Rails app | |
https://github.com/collinschaafsma/loyd | |
Example Sinatra app | |
https://github.com/collinschaafsma/slimfit | |
Awesome talk by Uncle Bob. | |
http://confreaks.com/videos/759-rubymidwest2011-keynote-architecture-the-lost-years | |
Clean Code Book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Vim < Formula | |
homepage 'http://www.vim.org/' | |
url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2' | |
head 'https://vim.googlecode.com/hg/' | |
sha256 '5c5d5d6e07f1bbc49b6fe3906ff8a7e39b049928b68195b38e3e3d347100221d' | |
version '7.3.206' | |
def features; %w(tiny small normal big huge) end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
has_and_belongs_to_many :employers | |
has_and_belongs_to_many :roles | |
end |