Skip to content

Instantly share code, notes, and snippets.

source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'sorcery'
gem 'jbuilder'
gem 'kaminari'
@austenito
austenito / gist:2951380
Created June 18, 2012 23:15
technologies!
* D3
* Canvas
* Compass
* >=3 programming languages
* Riak
* MongoDB
* ElasticSearch
* Services Architecture
* Amazon S3
* JavaScript Front-End
def self.get_all(user, authentication_token)
if user
github_client(authentication_token).get_repos_from(user["octochat_user_id"]).collect do |room|
{:owner => room.data.owner, :name => room.data.name, :id => room.data.id, :role => room.data.role }
#:branches => github_client(authentication_token).get_branches_from(room.data.owner, room.data.name).collect(&:data).collect(&:name) }
end
else
[]
end
end
@austenito
austenito / gist:2942239
Created June 16, 2012 18:50
Octochat error message
ActionView::MissingTemplate (Missing template main/index, application/index with {:locale=>[:en], :formats=>[:png], :handlers=>[:erb, :builder, :coffee]}. Searched in:
* "/Users/austenito/repos/hungry-academy/octochat/octochat/app/views"
* "/Users/austenito/.rvm/gems/ruby-1.9.3-p125@octochat/gems/twitter-bootstrap-rails-2.1.0/app/views"
):
@austenito
austenito / deploy.rb
Created June 7, 2012 13:32
octochat deploy rb
require 'bundler/capistrano'
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
require 'rvm/capistrano'
load 'deploy/assets'
load 'deploy'
set :application, "octochat"
set :repository, "git://github.com/HA-OctoChat/octochat.git"
set :branch, fetch(:branch, "assets")
set :rvm_path, "/home/vagrant/.rvm"
@austenito
austenito / gist:2882354
Created June 6, 2012 14:53
postgres hungry academy
bash < <(curl -sk https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
source /home/vagrant/.rvm/scripts/rvm
rvm install 1.9.3
rvm use 1.9.3
gem install passenger
rvmsudo passenger-install-nginx-module --auto --auto-download --prefix /opt/nginx
@austenito
austenito / nginx.conf
Created June 4, 2012 21:45
nginx + passenger configuration
worker_processes 4;
events {
worker_connections 1024;
}
http {
passenger_root /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12;
passenger_ruby /home/vagrant/.rvm/wrappers/ruby-1.9.3-p194/ruby;
bash < <(curl -sk https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
source /home/vagrant/.rvm/scripts/rvm
rvm install 1.9.3
rvm use 1.9.3
gem install bundler
gem install passenger
gem install rvm-capistrano
rvmsudo passenger-install-nginx-module --auto --auto-download --prefix /opt/nginx
bash < <(curl -sk https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
source /home/vagrant/.rvm/scripts/rvm
rvm install 1.9.3
rvm use 1.9.3
gem install bundler
gem install passenger
gem install rvm-capistrano
rvmsudo passenger-install-nginx-module --auto --auto-download --prefix /opt/nginx
"name" => "web",
"active" => true,
"config" => {
"url" => "http://something.com/webhook"
}
}