Skip to content

Instantly share code, notes, and snippets.

View erkattak's full-sized avatar

Erik Straub erkattak

View GitHub Profile
@webgio
webgio / JasmineSpec.coffee
Last active December 11, 2015 21:48
Sample Jasmine test for Marionette.js module
describe 'App.HeaderModule', ->
beforeEach ->
@headerModule = window.App.HeaderModule
it 'should exist', ->
expect(@headerModule).not.toBeUndefined()
describe 'starting', ->
@NapoleonWils0n
NapoleonWils0n / Mountain Lion Web Sharing.txt
Created November 11, 2012 00:13
macosx: Mountain Lion apache set up
Mountain Lion Web Sharing
Apache/WebSharing
The first difference in the new OS X 10.8 is the dropping of the GUI option to turn on Web Sharing in the System Preferences, it may be gone but Apache is definitely installed in the lower level of the OS and ready to go.
No Web Sharing Option in System Preferences
Apache is pre-installed and needs to be enabled via the command line - /Applications/Utilities/Terminal
@subelsky
subelsky / puma_rails_heroku.rb
Created October 31, 2012 13:51
Setting up Puma and Rails on Heroku
# Gemfile
gem "puma"
# Procfile
web: bundle exec puma -p $PORT -e $RACK_ENV -C config/puma.rb
# add to config block config/environments/production.rb
config.threadsafe!
# get rid of NewRelic after_fork code, if you were doing this:
@agnoster
agnoster / README.md
Last active April 6, 2024 22:35
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@jletourneau
jletourneau / ruck-beer.py
Last active January 27, 2018 05:04
Ruck beer list scraper
#!/usr/bin/python
from pyquery import PyQuery as pq
import re
import datetime
print datetime.datetime.now().strftime('%c')
print
doc = pq(url='http://www.beermenus.com/places/4733-the-ruck')
@kixxauth
kixxauth / better-javascript.js
Created March 31, 2012 17:41
JavaScript Objects and Promises
//
// Typical Prototype composure in JS; This is the classical way of creating and
// using objects in JS.
//
// "Super" or "Parent" object prototype
function Cat(color) {
this.color = color;
this.saying = 'meowwww';
}
class PostsController < ActionController::Base
def create
Post.create(post_params)
end
def update
Post.find(params[:id]).update_attributes!(post_params)
end
private
@schleg
schleg / 01. Gemfile
Created May 26, 2011 17:26
Setup for Devise + Omniauth
gem 'pg'
group :development do
gem 'ruby-debug'
end
gem 'rake', '~> 0.8.7'
gem 'devise'
gem 'oa-oauth', :require => 'omniauth/oauth'
gem 'omniauth'
gem 'haml'
gem 'dynamic_form'