Skip to content

Instantly share code, notes, and snippets.

Chris beakr

Block or report user

Report or block beakr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@beakr
beakr / cow.rb
Created Dec 3, 2011
First Class. It butchers cows…
View cow.rb
class Cow
@@num_legs_butchered = 0
def initialize(num_legs = 4)
@num_legs = num_legs
end
def legs
return @num_legs
end
View gist:1565283
(+ 4 5 )
(print "Hello world!")
View gist:1565348
;; Adding multiple nums ;;
(+ 2 3) ;; Adds 2 & 3 together...
(* 3 3) ;; 3 x 3, 9.
;; Just a lil' warm up...
(float (/ 7 10)) ;; Don't mistake all these semicolons for Javascript...*wink*
;; Algebra:
@beakr
beakr / gist:1634288
Created Jan 18, 2012
Terminal commands
View gist:1634288
$ cp ~/Downloads/sopa.vim .
@beakr
beakr / gist:1634406
Created Jan 18, 2012
SOPA theme instructions for Mac.
View gist:1634406
$ cd ~/.vim/colors
$ cp /downloads/sopa.vim .
View cuttlefish_test.rb
require 'cuttlefish'
date = Cuttlefish::Date.new
date.generate
View col_align.css
.themes {
color : black;
width : 250px;
float: left;
}
.books {
color : black;
float: left;
width : 33%;
@beakr
beakr / optionsPage.js
Created Feb 27, 2012
A gist providing the code for handling and saving the statuses of checkboxes using localStorage.
View optionsPage.js
$(function(){
// Get settings from local storage
var settings_pronounceable = localStorage.getItem("settings_pronounceable") == "true";
var settings_capitals = localStorage.getItem("settings_capitals") == "true";
var settings_numbers = localStorage.getItem("settings_numbers") == "true";
var settings_symbols = localStorage.getItem("settings_symbols") == "true";
// Configure settings display with values from local storage, or use defaults
$("#settings_pronounceable").prop("checked", settings_pronounceable);
@beakr
beakr / rounded_field.css
Created Mar 6, 2012
Rounded text fields
View rounded_field.css
my_field {
border-radius: 5px;
height: 20px; width: 200px;
padding: 3px 10px;
}
View init.rb
def initialize
@moos = moos
@oinks = oinks
@clucks = clucks
end
You can’t perform that action at this time.