Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
| DROP TABLE IF EXISTS survey_sessions; | |
| -- Imagine a table with survey sessions | |
| -- token: some id or token to access a survey | |
| -- answers: a key value store for answers | |
| CREATE TABLE survey_sessions ( | |
| token text, | |
| answers hstore); | |
| -- We need some data to play with | |
| INSERT INTO survey_sessions (token, answers) VALUES ('9IaxxP', 'a=>1, b=>2'); |
| gem 'pg' | |
| group :development do | |
| gem 'ruby-debug' | |
| end | |
| gem 'rake', '~> 0.8.7' | |
| gem 'devise' | |
| gem 'oa-oauth', :require => 'omniauth/oauth' | |
| gem 'omniauth' | |
| gem 'haml' | |
| gem 'dynamic_form' |
| <?php | |
| /* | |
| Template Name: Landing | |
| */ | |
| // Add custom body class to the head | |
| add_filter( 'body_class', 'add_body_class' ); | |
| function add_body_class( $classes ) { | |
| $classes[] = 'landing-page'; |
| class Integer | |
| N_BYTES = [42].pack('i').size | |
| N_BITS = N_BYTES * 16 | |
| MAX = 2 ** (N_BITS - 2) - 1 | |
| MIN = -MAX - 1 | |
| end | |
| p Integer::MAX #=> 4611686018427387903 | |
| p Integer::MAX.class #=> Fixnum | |
| p (Integer::MAX + 1).class #=> Bignum |
#List of countries
It's time someone compiled a list of countries to use within a web application. This gist attempts to make a first move at that.
I've also compiled a list of nationalities
| .ui-autocomplete { | |
| position: absolute; | |
| top: 100%; | |
| left: 0; | |
| z-index: 1000; | |
| float: left; | |
| display: none; | |
| min-width: 160px; | |
| _width: 160px; | |
| padding: 4px 0; |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |