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
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
<!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
#!/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
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
/* | |
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
class Object | |
def self.instance_methods_by_module | |
class_methods = [] | |
self.ancestors.reverse.each do |a| | |
new_methods = a.instance_methods.sort | |
class_methods.each do |cm| | |
new_methods = new_methods - cm[1] | |
end | |
class_methods << [ a.name, new_methods ] | |
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
class ROpenStruct < OpenStruct | |
def initialize(hash=nil) | |
@table = {} | |
for k,v in hash | |
@table[k.to_sym] = wrap(v) | |
new_ostruct_member(k) | |
end | |
end | |
def wrap(value) |
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
git init | |
git add . | |
git commit -m "Initial" | |
heroku create <APP> | |
heroku addons:add custom_domains | |
heroku domains:add <APP>.com | |
heroku domains:add www.<APP>.com | |
git push heroku master |
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
using System.Collections; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
using System.Linq; | |
using NUnit.Framework.Constraints; | |
namespace NUnit.Framework | |
{ | |
public static class AwesomeTestExtensions |