Skip to content

Instantly share code, notes, and snippets.

View ethnt's full-sized avatar
🐢

Ethan Turkeltaub ethnt

🐢
View GitHub Profile
App.controllers do
layout 'foo.erb' # Or whatever
get :index do
haml :layout
end
end
@ethnt
ethnt / gist:5558608
Created May 11, 2013 01:50
Create a web server with the current directory on port 8000.
$ python -m SimpleHTTPServer
@ethnt
ethnt / Gemfile
Last active December 15, 2015 14:49 — forked from passcod/Gemfile
How to use Sidekiq with Padrino.
# ...
gem 'sidekiq'
gem 'slim'
# ...
@ethnt
ethnt / gist:5248343
Created March 26, 2013 19:22
Remove value from array with Underscore.js in CoffeeScript.
arr = ["foo", "bar", "foobar"]
arr = _.without arr, "foobar"
console.log arr #=> ["foo, "bar"]
@ethnt
ethnt / Notes.md
Created February 15, 2013 02:18
Notes from Mike Monteiro's San Francisco Creative Morning's presentation, "F*ck You. Pay Me."
  • Have a contract (clear definitions, clear expectations)
  • If project changes, that project closes, settle up, new project
  • No "you can trust us"
  • Make it so client can't bring in another designer or developer (it's my job: no competing), fireable offense
  • Can fire client, in contract
  • Have a good lawyer
  • Contracts
    • Protect both parties
    • Don't start work without a contract
  • Don't blindly accept their terms
@ethnt
ethnt / vermonster.rb
Created November 7, 2012 22:22
An example of using Vermonster.
# Create a new instance of Vermonster::Client
cheddar = Vermonster::Client.new(:id => "client-id", :secret => "client-secret")
# Get the URL for the user to authorize the application (all parameters optional).
url = cheddar.authorize_url(:callback => "http://github.com", :state => "Foobar")
# Do whatever you need to to send the user to that URL...
# It redirects back to whatever you set as the callback URL.
# In your controller (or wherever Cheddar sent the user back to),
@ethnt
ethnt / Jack.java
Created October 29, 2012 16:51
An example of using Jack.
Jack connection = new Jack();
connection.get("http://api.dribbble.com/players/simplebits"); // => {"id":1,"name":"Dan Cederholm","username":"simplebits","url":"http://dribbble.com/simplebits","avatar_url":"http://dribbble.com/system/users/1/avatars/original/dancederholm-peek.jpg","location":"Salem, MA","twitter_screen_name":"simplebits","drafted_by_player_id":null,"shots_count":147,"draftees_count":103,"followers_count":2027,"following_count":354,"comments_count":2001,"comments_received_count":1509,"likes_count":7289,"likes_received_count":2624,"rebounds_count":15,"rebounds_received_count":279,"created_at":"2009/07/07 21:51:22 -0400"}
@ethnt
ethnt / bootstrap.sh
Created August 28, 2012 16:26
Bootstrap the clock.
#!/bin/sh
#
# Well howdy!
#
sudo echo ""
echo "\033[1m clock ⌛\033[0m"
echo "\033[1m a clock for farmington high school\033[0m"
@ethnt
ethnt / SEO.markdown
Created August 14, 2012 14:33
Coolspotters SEO.

Introduction

This document is based on Tanner Christensen's original report.

This report is to highlight problems and give solutions for the search engine optimization of Coolspotters.

Keywords

Terms such as "emma watson style", "emma watson fashion", and "emma watson shoes" continue to be important for leading users to Coolspotters. However, many people are also searching for just "emma watson" and ending up at Coolspotters.