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 'rake/clean' | |
HAML = FileList['**/*.haml'] | |
LESS = FileList['**/*.less'] | |
COFFEE = FileList['**/*.coffee'] | |
HTML = HAML.ext('html') | |
CSS = LESS.ext('css') | |
JS = COFFEE.ext('js') |
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
#Execute all of these commands starting at your root. you can type: cd ~ to make sure you are there | |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bash_profile # Mac OS X runs .bash_profile not .bashrc each time a new terminal window is opened. | |
. ~/.bash_profile | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # this takes a couple of minutes |
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
Host heroku.com | |
HostName heroku.com | |
User git | |
IdentityFile ~/.ssh/heroku.identity | |
IdentitiesOnly yes |
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 DeviseInvitableAddToUsers < ActiveRecord::Migration | |
def self.up | |
change_table :users do |t| | |
t.string :invitation_token, :limit => 60 | |
t.datetime :invitation_sent_at | |
t.index :invitation_token | |
t.integer :invitation_limit | |
t.integer :invited_by_id | |
t.string :invited_by_type | |
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
gem 'devise', '~> 1.2.0' | |
gem 'devise_invitable', '~> 0.4.rc5' |
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 InvitationsController < Devise::InvitationsController | |
include Devise::Controllers::InternalHelpers #not sure if this is necessary | |
# POST /resource/invitation | |
def create | |
#Assuming the user_id of the gifted user is = 1 | |
if current_user.id == 1 | |
current_user.increment!(:invitation_limit) |
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
www: | |
requirements: | |
- faye | |
- jade |
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
/* Compass .scss for rotating the div when the class of .open is added to it and rotating back when it is removed */ | |
#direction_arrow { | |
position: absolute; | |
right: 5px; | |
top: 135px; | |
cursor: pointer; | |
z-index: 999999; | |
-webkit-transition: all 0.1s linear; | |
&.open { |
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
//Trying to put it all in one file then break it out later. | |
// Load the application once the DOM is ready | |
$(function(){ | |
//////////////////////////////////////////////////////// | |
// Dog Model | |
//////////////////////////////////////////////////////// | |
window.Dog = Backbone.Model.extend({ | |
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
<h1>All Dogs</h1> | |
<div id="dogsapp"> | |
<div id="dogs"> | |
<table id="dog-table"> | |
<tr> | |
<th>Name</th> | |
<th>Color</th> | |
<th>Age</th> | |
</tr> |