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
#!/bin/sh | |
# Update Rails and install Git | |
sudo gem update --system | |
sudo gem install rails | |
curl -O http://kernel.org/pub/software/scm/git/git-1.6.5.2.tar.gz | |
tar xvzf git-1.6.5.2.tar.gz | |
cd git-1.6.5.2 | |
./configure | |
make |
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
/* | |
* Generated by class-dump 3.3.1 (64 bit). | |
* | |
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2009 by Steve Nygard. | |
*/ | |
#import <JSON/JSON.h> | |
@interface JSON (JSONParser) | |
+ (id)objectWithData:(id)arg1 options:(unsigned int)arg2 error:(id *)arg3; |
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
// | |
// Moved to Stack Overflow | |
// http://stackoverflow.com/questions/1689636/nspredicate-memory-issues | |
// |
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 'rubygems' | |
require 'sinatra' | |
set :app_file, __FILE__ | |
set :root, File.dirname(__FILE__) | |
before do | |
content_type 'text/plain', :charset => 'utf-8' | |
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 'xmlrpc/client' | |
chimp = XMLRPC::Client.new2("http://api.mailchimp.com/1.2/") | |
api_key = "API key here" | |
list_id = "list id here" | |
email = "email to add here" | |
begin | |
chimp.call("listSubscribe", api_key, list_id, email, {}, 'html', false, true, true) | |
rescue Exception => e |
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
development: | |
adapter: postgresql | |
database: samsoffes_development | |
encoding: utf8 | |
username: samsoffes | |
password: | |
host: localhost | |
production: | |
adapter: postgresql |
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
// calloc |
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
// Check out http://github.com/samsoffes/k-and-r for all of the examples | |
// This one is located at http://github.com/samsoffes/k-and-r/blob/master/examples/1.1-1.c | |
#include <stdio.h> | |
main() { | |
printf("Hello, world\n"); | |
} |
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
-----> Heroku receiving push | |
-----> Gemfile detected, running gem bundle | |
Calculating dependencies... | |
Gemspec for rails (3.0.pre) is invalid: Missing require path: 'lib' | |
ERROR: While executing gem ... (Bundler::DirectorySourceError) | |
No gemspec for 'rails' was found in '/disk1/tmp/32200_2392682156 |
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
# Use Bundler (preferred) | |
environment = File.expand_path('../../vendor/gems/environment', __FILE__) | |
if File.exist?("#{environment}.rb") | |
require environment | |
# Use 2.x style vendor/rails and RubyGems | |
else | |
vendor_rails = File.expand_path('../../vendor/rails', __FILE__) | |
if File.exist?(vendor_rails) | |
Dir["#{vendor_rails}/*/lib"].each { |path| $:.unshift(path) } |