Skip to content

Instantly share code, notes, and snippets.

View soffes's full-sized avatar

Sam Soffes soffes

View GitHub Profile
#!/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
/*
* 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;
//
// Moved to Stack Overflow
// http://stackoverflow.com/questions/1689636/nspredicate-memory-issues
//
require 'rubygems'
require 'sinatra'
set :app_file, __FILE__
set :root, File.dirname(__FILE__)
before do
content_type 'text/plain', :charset => 'utf-8'
end
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
development:
adapter: postgresql
database: samsoffes_development
encoding: utf8
username: samsoffes
password:
host: localhost
production:
adapter: postgresql
// calloc
// 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");
}
-----> 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
# 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) }