Skip to content

Instantly share code, notes, and snippets.

View mathias's full-sized avatar

Matt Gauger mathias

View GitHub Profile
JQuery @ Web414, Nov 13th 2008
------------------------------
@offwhitemke (Brennan)
"You can't do JQuery unless you know HTML, CSS."
* Height
* Margin
* Padding
* Border
* Float
/*
*
* The fonts included are copyrighted by the vendor listed below.
*
* @vendor: Google Android
* @vendorurl: http://code.google.com/android/
* @licenseurl: http://www.fontsquirrel.com/license/Droid-Sans
*
*
*/
Step 0. Start preheating oven to 425 degrees F.
Step 1. Mix lots of pancake batter. Aim for slightly less liquid than what you'd make pancakes with. Make enough batter to fill your bread pan.
Step 2. Grease bread pan. Mix the pancake batter a little more.
Step 3. Pour batter in pan.
Step 4. Put bread pan in oven.
Step 5. Cook for 40 minutes or so. Use your judgment here. *Don't burn it!*
Step 5.5. Remove from oven, let it cool for at least 15 minutes.
*Web414 Feb 11, 2010:*
Workflow
---
What do you use for bug tracking?
----
Mantis, Trac, Bugzilla, Pivotal Tracker, Intervals
Hacking OpenAtrium case tracker to support bug tracking
#!/usr/bin/env ruby -wKU
input = gets.chomp
if (input).to_i.integer?
userInput = input
end
def collatzRecursive(number)
number = number.to_i
#!/usr/bin/env ruby
## post-receive
##
## Description:
## This should live in a gitosis repo's .git/hooks directory and be set executable
## It is run every time someone sucessfully does a "git push" to the server
## Then it POSTs to a server, ideally creating a Drupal node with the details of the git push.
require 'net/http'
(define (sum-of-largest-squares x y z)
(cond
((and (>= x y) (>= y z)) (sum-of-squares x y))
((and (>= y x) (>= x z)) (sum-of-squares x y))
((and (>= x y) (>= z y)) (sum-of-squares x z))
(else (sum-of-squares y z))))
CLI:
homebrew
git
rvm
ruby 1.9.x
rails 3.x
googlecl
irssi
readline
unrar
# I stole Giles Bowkett's Password Gem's password generator method.
# Since I don't trust a plaintext file in my home dir for secrecy,
# but I do like making strong passwords
## USAGE: Fire up irb and paste this badboy in. Then call generate or generate(140) etc.
def generate(length = 23)
# how to make this elegant?
password = ""
#!/usr/bin/env ruby -wKU
## Attempt 1:
1.upto(100) { |num|
if (num % 3) == 0 && (num % 5) == 0
puts "FizzBuzz"
elsif (num % 3) == 0
puts "Fizz"
elsif (num % 5) == 0
puts "Buzz"