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
/* | |
example usage | |
============= | |
$('#target').machine({ | |
stopped : { | |
enter : ['a.pause:hide', 'a.play:show'], | |
exit : ..., | |
'a.play:click' : 'playing' | |
}, |
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
9.0 Inception | |
8.9 Black Swan | |
8.8 Toy Story 3 | |
8.8 The Way Back | |
8.6 127 Hours | |
8.4 The King's Speech | |
8.4 The Borrowers | |
8.3 The Social Network | |
8.2 How to Train Your Dragon | |
8.2 The Fighter |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'imdb_party' | |
require 'mechanize' | |
def movie_list_2010 | |
page = Mechanize.new.get 'http://filmography2010.blogspot.com/' | |
results = page.search 'div.entry-content a[href*="imdb"]' | |
results.map {|r| r[:href] =~ /(tt\d+)/; $1 } | |
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
<!DOCTYPE html> | |
<html lang='en-US' xml:lang='en-US' xmlns='http://www.w3.org/1999/xhtml'> | |
<head> | |
<meta content='text/html; charset=utf-8' http-equiv='Content-type' /> | |
<title>iBots Beta</title> | |
<style type='text/css'> | |
body { | |
font-family: 'Helvetica Neue Light', HelveticaNeue-Light, Helvetica, Arial, sans-serif; | |
width: 600px; | |
margin: 0 auto; |
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
SPRITESHEETS = File.expand_path "spritesheets" # This is where the source images are | |
# Extracts some useful information from the full_path | |
def path_info base_path, full_path | |
relative = full_path.gsub "#{base_path}/", "" | |
{ | |
full_path: full_path, | |
relative_path: relative, | |
filename: File.basename(relative) | |
} |
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
Wox::Tasks.create :info_plist => 'assets/Info.plist' do | |
build :release, :configuration => 'Release', :developer_certificate => 'iPhone Developer' do | |
ipa :adhoc, :provisioning_profile => 'Team Provisioning Profile' do | |
testflight :publish, :api_token => 'PUT_YOUR_API_TOKEN_HERE', | |
:team_token => 'PUT_YOUR_TEAM_TOKEN_HERE', | |
:notes => proc { File.read("CHANGELOG") }, | |
:distribution_lists => %w[Internal], | |
:notify => true | |
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
require 'em-hiredis' | |
module EMServer | |
def post_init | |
puts "-- someone connected to the echo server!" | |
end | |
def receive_data data | |
redis = EM::Hiredis.connect | |
redis.callback do |
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
multi = EventMachine::Multi.new | |
multi.add :query1, query1 | |
multi.add :query2, query2 | |
multi.callback do |results| | |
puts results | |
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
2012-05-27 11:34:09 Welcome to Minecraft Overviewer! | |
2012-05-27 11:34:09 Checking all tiles for updates manually. | |
2012-05-27 11:34:31 Rendered 0 of 22369621. 0% complete | |
******************************************************************************* | |
2012-05-27 11:34:35 E An error has occurred. This may be a bug. Please let us know! | |
See http://docs.overviewer.org/en/latest/index.html#help | |
This is the error that occurred: | |
Traceback (most recent call last): | |
File "overviewer/overviewer.py", line 493, in <module> |
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
2012-05-27 11:59:06 Welcome to Minecraft Overviewer! | |
2012-05-27 11:59:06 Checking all tiles for updates manually. | |
******************************************************************************* | |
2012-05-27 11:59:06 E An error has occurred. This may be a bug. Please let us know! | |
See http://docs.overviewer.org/en/latest/index.html#help | |
This is the error that occurred: | |
Traceback (most recent call last): | |
File "overviewer/overviewer.py", line 493, in <module> | |
ret = main() |