Skip to content

Instantly share code, notes, and snippets.

~/Downloads$ tar -xvzf sqlite-amalgamation-3.7.3.tar.gz
x sqlite-3.7.3/
x sqlite-3.7.3/depcomp
x sqlite-3.7.3/sqlite3.pc
x sqlite-3.7.3/aclocal.m4
x sqlite-3.7.3/README
x sqlite-3.7.3/ltmain.sh
x sqlite-3.7.3/configure
x sqlite-3.7.3/shell.c
x sqlite-3.7.3/configure.ac
find_header: checking for sqlite3.h... -------------------- yes
"gcc -E -I. -I/Users/admin/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/i686-darwin10.4.0 -I/Users/admin/project/sqlite3-ruby/ext/sqlite3 -I/usr/local/include -I/opt/local/include -I/sw/local/include -I/usr/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -g -O2 -pipe -fno-common conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include <sqlite3.h>
/* end */
--------------------
ree@project:~/project/sqlite3-ruby(master)$ sqlite3 -version
3.7.3
ree@project:~/project/sqlite3-ruby(master)$ which sqlite3
/opt/local/bin/sqlite3
ree@project:~/project/sqlite3-ruby(master)$ ls -la /usr/local/include/sqlite3.h
-rw-r--r--@ 1 root wheel 291347 26 Nov 20:57 /usr/local/include/sqlite3.h
ree@project:~/project/sqlite3-ruby(master)$ gem install rake-compiler
@lawrencepit
lawrencepit / gist:719669
Created November 29, 2010 06:52
Authlogic: allow httponly secure cookies, to prevent sidejacking
#
# Monkey patch to allow authlogic's *_credentials cookies set the HttpOnly
# and Secure bits. Add this code to your #{Rails.root}/config/initializers dir.
#
# @user_session = UserSession.new(params[:user_session])
# @user_session.httponly = true
#
# or:
#
# class UserSession < Authlogic::Session::Base
#! /bin/sh
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the unicorn app server
# Description: starts unicorn using start-stop-daemon
<meta content='text/javascript' http-equiv='Content-Script-Type'>
if (!String.prototype.template)
{
/**
* Substitute model values into a template string.
*
* Model values placeholders are represented by a reference between
* curly braces prefixed with a hash.
*
* Example:
* "Page #{page} of #{pages}".template({page:3; pages:20;})
create_table "groups_people", :id => false, :force => true do |t|
t.integer "group_id", :null => false
t.integer "person_id", :null => false
end
add_index "groups_people", ["group_id"], :name => "index_groups_people_on_group_id"
add_index "groups_people", ["person_id"], :name => "index_groups_people_on_person_id"
# Chuck this in config/initializers for view-first validations
ActionView::Base.default_form_builder.class_eval do
def error(field)
errors(field).first
end
def errors(field)
object.errors.for(field)
end
end
##
# Calendar helper with proper events
# http://www.cuppadev.co.uk/webdev/making-a-real-calendar-in-rails/
#
# (C) 2009 James S Urquhart (jamesu at gmail dot com)
# Derived from calendar_helper
# (C) Jeremy Voorhis, Geoffrey Grosenbach, Jarkko Laine, Tom Armitage, Bryan Larsen
# Licensed under MIT. http://www.opensource.org/licenses/mit-license.php
##