Skip to content

Instantly share code, notes, and snippets.

View adamyeats-zz's full-sized avatar

Adam Yeats adamyeats-zz

  • Ocasta Studios
  • Brighton, England
View GitHub Profile
@JoeStanton
JoeStanton / deploy.rb
Created January 25, 2013 10:13
Example Capistrano Deployment file for Node.js Projects
set :application, "SampleApp"
set :repository, "."
set :scm, :none
set :use_sudo, false
set :keep_releases, 5
#Use the copy method which will compress and scp the files
set :deploy_via, :copy
set :main_js, "app.js"
after_success:
- chmod 600 deployment/key.pem
- ssh-add deployment/key.pem
- gem install capistrano
- cap deploy
@codeincontext
codeincontext / gist:4286311
Created December 14, 2012 15:36
ssh into the same directory on the server as your local working directory. If you're in /Users/skattyadz/Dropbox/code/instawall, it will ssh in and "cd instawall"
# add to ~/.bash_profile
function sshh() {
local PROJECTNAME=${PWD##*/}
local HOST=$1
eval "ssh -t ${HOST} \"cd ${PROJECTNAME}; bash\""
}
@codeincontext
codeincontext / gist:3707167
Created September 12, 2012 14:53
Facebook and Twitter login with Sinatra
require 'rubygems'
require 'sinatra'
require 'json'
require 'omniauth'
require 'omniauth-facebook'
require 'omniauth-twitter'
class SinatraApp < Sinatra::Base
configure do
set :sessions, true
@codeincontext
codeincontext / gist:3033933
Created July 2, 2012 15:56
Konami code using the Gamepad API
<!DOCTYPE html>
<html>
<head>
<title>Gamepad Shit</title>
<script type="text/javascript"></script>
<style type="text/css"></style>
</head>
<body>
<h1>Gamepad Shit</h1>
@growdigital
growdigital / smacss-sass-headings.scss
Created May 4, 2012 17:33
SMACSS Sass headings
///////////////////////////////////////////////////////////////////////////////////
//
// 88888888ba db ad88888ba 88888888888
// 88 "8b d88b d8" "8b 88
// 88 ,8P d8'`8b Y8, 88
// 88aaaaaa8P' d8' `8b `Y8aaaaa, 88aaaaa
// 88""""""8b, d8YaaaaY8b `"""""8b, 88"""""
// 88 `8b d8""""""""8b `8b 88
// 88 a8P d8' `8b Y8a a8P 88
// 88888888P" d8' `8b "Y88888P" 88888888888

High level style in javascript.

Opinions are like assholes, every one has got one.

This one is mine.

Punctuation: who cares?

Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.

@gcatlin
gcatlin / gist:1847248
Created February 16, 2012 19:43
Install specific version of Homebrew formula
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#
@aronwoost
aronwoost / README.md
Created July 25, 2011 19:46
How to install LAMP on a EC2 Amazon AMI

Launch the instance and connect with ssh.

##Update the server

sudo yum update

##Install php and MySQL packages