Skip to content

Instantly share code, notes, and snippets.

View sferik's full-sized avatar

Erik Berlin sferik

View GitHub Profile
<script type="text/javascript">
$(document).ready(function(){
$.stratus({
auto_play: true,
download: false,
key: "Enter your Client ID here",
links: 'http://soundcloud.com/qotsa',
random: true
});
});
<script type="text/javascript">
$(document).ready(function(){
$.stratus({
key: "Enter your Client ID here",
links: "https://soundcloud.com/zedsdead/sets/somewhere-else-ep"
});
});
</script>
@sferik
sferik / config.rb
Created November 20, 2009 00:59 — forked from merbjedi/config.rb
MerbAdmin DSL
MerbAdmin.config User do
label "Users" # @model.pretty_name
list do
before do
puts "Called before list"
end
fields :name, :description # All columns
filters :publication_date, :retired # All booleans
#!/bin/sh
#
# This script is an adaptation from http://www.sqlite.org/cvstrac/wiki?p=ConverterTools
# It expects stdin input from mysqldump with the following params:
# mysqldump --skip-extended-insert --add-drop-table --compatible=ansi --skip-add-locks --skip-comments --skip-disable-keys --skip-set-charset
# Note: Don't use --skip-quote-names as this script expects quoted names
#
# Note: This script imports boolean values as they are stored in Mysql, e.g., as the integers 0 and 1.
# As a result, boolean fields need to be further normalized after this transform step
# such that false field values are 'f' and true field values are 't', which is
@sferik
sferik / gist:269793
Created January 5, 2010 22:13 — forked from carllerche/gist:177377
Thread.new is slow
require "rubygems"
require "rbench"
def noop
end
RBench.run(100_000) do
column :one, :title => "Unthreaded"
column :two, :title => "Threaded"
@sferik
sferik / 1_class_refactored_solution.rb
Last active September 7, 2015 20:47 — forked from JoshCheek/1_class_refactored_solution.rb
Checking the Credits, y'all!
def valid?(card_number)
digits = card_number
.split("")
.map { |number| number.to_i }
numbers = []
digits.each_with_index do |digit, index|
if index.even?
numbers << digit * 2
else
@sferik
sferik / Questions
Created July 12, 2011 00:14
Magma Rails Give-away
Day Job: Fellow at Code for America
Open Source contribution: lots of gems: rails_admin, omniauth, multi_xml, multi_json, faraday, twitter, simple_oauth, oauth2, octokit, and many more.
Tell me about your experience with Ruby/Rails: I started using Rails in 2006, shortly after version 1 was released. I then switched to primarily using Merb in 2008 and released my first Open Source project on GitHub: MerbAdmin. I then switched back after Rails 3 was released and oversaw the porting of MerbAdmin to Rails 3 as a Ruby Summer of Code mentor.
How do you use GitHub: GitHub is my life.
Favorite luchador(es): I must confess, I know almost nothing about lucha libre.
@sferik
sferik / emoji.txt
Created September 20, 2012 04:05 — forked from stephencelis/emoji.txt
Emoji not on the iOS Keyboard
2139 ℹ INFORMATION SOURCE
23EB ⏫ BLACK UP-POINTING DOUBLE TRIANGLE
23EC ⏬ BLACK DOWN-POINTING DOUBLE TRIANGLE
23F0 ⏰ ALARM CLOCK
23F3 ⏳ HOURGLASS WITH FLOWING SAND
26C5 ⛅ SUN BEHIND CLOUD
26D4 ⛔ NO ENTRY
2705 ✅ WHITE HEAVY CHECK MARK
2753 ❓ BLACK QUESTION MARK ORNAMENT
2757 ❗ HEAVY EXCLAMATION MARK SYMBOL

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for Google TV

Consumer key: iAtYJ4HpUVfIUoNnif1DA

WDI Lab - April 8, 2013

Movies

You will be creating a movies app using Sinatra and the OMDB API.

Requirements

  • Ability to search for a movie by title
  • Ability to click on a search result to see detailed information about a movie including:
    • Title
  • Year