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
# so I like sinatra. a lot. but I feel like it needs to do a little bit more. | |
# so I am working on something based on coercive methods to your models which | |
# makes more sense to me. I am trying to implement it as Rack middleware, but | |
# not completely sure if I am going to be able to do it without an actual, no | |
# kidding fork of the awesome sinatra project. hoping to avoid that. | |
# | |
# this code does not work, but it's a little mock-up of a simple blog that I | |
# _wish_ would work. when a request comes in with the accept headers set, it | |
# makes sure that the format is set properly. it will also accept .format style | |
# requests, in my mind. and, heavy heavy caching stuff built in. so really for |
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 "jabberjaw" #I need a new name, since I am decoupling this from XMPP... | |
setup do | |
add_transport :xmpp, | |
:username => 'something', | |
:password => '*****', | |
:server => 'goteamfun.com' | |
add_transport :email, | |
:class => JabberJaw::Examples::POPJaw |
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 THIS IN SINATRA | |
# | |
# require 'sinatra' | |
# require 'declarative_parameters' | |
# helpers DeclarativeParameters | |
# | |
# get '/some/uri' do | |
# required :name | |
# required :age, :type => :int, :min => 18 | |
# |
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
/* | |
* BEGIN Custom patches | |
*/ | |
// This is the content type I will return on most of my requests, | |
// so I'm adding it as the default. I can overwrite the headers | |
// to change it if necessary on the individual handlers. | |
http.ServerResponse.prototype.headers = ["Content-Type: text/html"]; | |
http.ServerResponse.prototype.writeHeadArray = function(statusCode){ |
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/env ruby | |
require 'rubygems' | |
require 'grit' | |
repo = Grit::Repo.new(File.join(File.dirname(__FILE__), '..','..')) | |
while msg = gets | |
old_sha, new_sha, ref = msg.split(' ', 3) | |
commit = repo.commit(new_sha) |
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
an anon gist |
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 within?(range) | |
range.cover?(self) | |
end | |
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
def each(&block) | |
master.each(&block) | |
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
def each(&block) | |
master.each(&block) | |
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
TF_API_TOKEN: <your TestFlight API token> | |
TF_TEAM_TOKEN: <your TestFlight team token> | |
TF_DISTRIBUTION: <name of distribution list to notify> | |
DEVELOPER_PREFIX: <path to your developer directory, e.g., /Developer-4.2> | |
ARCHIVE_DIRECTORY: <path for saving archived builds> | |
DEVELOPER_NAME: <keychain name of developer certificate> | |
PROVISONING_PROFILE: <full path to distribution provisioning profile> |
OlderNewer