Skip to content

Instantly share code, notes, and snippets.

View terrafied's full-sized avatar
💭
Shopping for cute shoes

Terra Metta terrafied

💭
Shopping for cute shoes
  • The Trans Agenda
  • 62 West Wallaby St., The Shire
View GitHub Profile
@terrafied
terrafied / gist:9962075
Created April 3, 2014 20:17
Zeus not recognizing that block is closed

Given a block method which takes an argument and an optional hash, zeus cannot recognize the block on the commandline if paretheses are used.

To wit, on the commandline

2.1.0 > def test(sym, opts={}, &block)
2.1.0?>     puts "starting #{sym} with options #{opts.to_s}"
2.1.0?>     yield
2.1.0?>     puts "ending #{sym}"
2.1.0?>   end
@terrafied
terrafied / keybase.md
Created September 10, 2014 20:50
Keybase Confirmation

Keybase proof

I hereby claim:

  • I am johnmetta on github.
  • I am johnmetta (https://keybase.io/johnmetta) on keybase.
  • I have a public key whose fingerprint is 3FC1 B761 BA1F 5738 6385 BAB4 443D 4D4F 8F14 DBBF

To claim this, I am signing this object:

@terrafied
terrafied / test_mailer.rb
Created November 24, 2014 19:11
Rails console test email
class TestMailer < ActionMailer::Base
default :from => "me@mysite.com"
def welcome_email
mail(:to => "other@elsewhere.com", :subject => "Test mail", :body => "Test mail body")
end
end
TestMailer.welcome_email.deliver
@terrafied
terrafied / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
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
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
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",
@terrafied
terrafied / Multiple Rubies
Created January 29, 2011 17:14
veewee error with RVM
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"]
# ~/.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
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.