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
module Randomizer | |
def self.included(base) | |
base.extend ClassMethods | |
end | |
module ClassMethods | |
def some(num = 5) | |
find :all, :order => 'random()', :offset => (count * rand).to_i, :limit => num | |
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
module Randomizer | |
def self.included(base) | |
base.extend ClassMethods | |
end | |
module ClassMethods | |
def some(num = 5) | |
find :all, :order => 'random()', :offset => (count * rand).to_i, :limit => num | |
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
Veewee::Session.declare( { | |
:cpu_count => '1', | |
:memory_size=> '512', | |
:disk_size => '10140', | |
:disk_format => 'VDI', | |
:disk_size => '10240' , | |
:os_type_id => 'Ubuntu', | |
:iso_file => "ubuntu-10.04.1-server-i386.iso", | |
:iso_src => "http://releases.ubuntu.com/10.04.1/ubuntu-10.04.1-server-i386.iso", | |
:iso_md5 => "01f72c846845e4e19aec8a45912e5dda", |
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
boudica:veewee john$ rvm rake build['mettabox'] --trace | |
build[mettabox] --trace | |
rvm 1.1.0 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/] | |
(in /Users/john/Work/veewee) | |
** Invoke build (first_time) | |
** Execute build | |
isofile ubuntu-10.04.1-server-amd64.iso is available | |
["6336b3f6e6dfb69cf8dca4be7781f709", "30b5c6fdddbfe7b397fe506400be698d"] |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |
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
By ERRIN HAINES | |
The Associated Press | |
Tuesday, March 1, 2011; 6:58 PM | |
ATLANTA -- Georgia is the latest state to propose legislation that questions whether President Barack Obama was born in the U.S., joining 10 other states who have measures that want more proof before his name is put on the 2012 ballot. | |
Even though Hawaii officials have repeatedly confirmed Obama's citizenship, his birth certificate has been made public and courts have rebuffed challenges, the so-called "birther" issue hasn't gone away. | |
Georgia Rep. Mark Hatfield, a Republican, said he still doesn't know if Obama is eligible to serve as president, and 92 of his GOP colleagues and one Democrat support the bill introduced Monday. |
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
''' | |
Created on Feb 2, 2011 | |
@author: john | |
''' | |
import sqlite3 | |
import scipy | |
import random | |
#Input: (time, lat, lon, a, b, c,) |
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
<VirtualHost *:80> | |
RedirectMatch /sti_offset_air(.*)$ https://64.79.208.238/sti_offset_air$1 | |
ServerAdmin info@sustainabletravel.com | |
DocumentRoot /var/www/production | |
ServerName sustainabletravelinternational.org | |
ServerAlias chinook.sustainabletravelinternational.org www.sustainabletravelinternational.org sustainabletravel.com chinook.sustainabletravel.com | |
<Directory /var/www/production> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride None |
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/local/bin/ruby | |
if ARGV.length < 2 | |
raise "Must have a path and a deployment name (i.e. deploy.rb /path/to/app theappname)" | |
end | |
p "Deploying for #{ARGV.join(",")}" | |
def listdir path | |
dirs = Dir.entries(path) |
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
module Randomizer | |
def self.included(base) | |
base.extend ClassMethods | |
end | |
module ClassMethods | |
def some(num = 5) | |
find :all, :order => 'rand()', :offset => (count * rand).to_i, :limit => num | |
end |
OlderNewer