I hereby claim:
- I am mlambie on github.
- I am mlambie (https://keybase.io/mlambie) on keybase.
- I have a public key whose fingerprint is 0831 CEAE CB30 AF49 596E 4C11 B0A7 C398 DB3C F117
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# Recursion | |
def recursive x | |
return if x >= 10 | |
puts x | |
recursive x + 1 | |
end | |
recursive 0 |
#!/bin/bash | |
# Credit: http://blog.infinitered.com/entries/show/6 | |
echo -e "\\e[0mCOLOR_NC (No color)" | |
echo -e "\\e[1;37mCOLOR_WHITE\\t\\e[0;30mCOLOR_BLACK" | |
echo -e "\\e[0;34mCOLOR_BLUE\\t\\e[1;34mCOLOR_LIGHT_BLUE" | |
echo -e "\\e[0;32mCOLOR_GREEN\\t\\e[1;32mCOLOR_LIGHT_GREEN" | |
echo -e "\\e[0;36mCOLOR_CYAN\\t\\e[1;36mCOLOR_LIGHT_CYAN" | |
echo -e "\\e[0;31mCOLOR_RED\\t\\e[1;31mCOLOR_LIGHT_RED" |
#!/bin/bash | |
git log --oneline --reverse --since="midnight" --author="mlambie" |
<?php | |
require_once('FirePHPCore/FirePHP.class.php'); | |
require_once('FirePHPCore/fb.php'); | |
// some reports indicate the output buffering is required | |
// ob_start(); | |
FB::setEnabled(true); |
-- Register to track if we need a new window or not | |
set tab_count to 0 | |
-- The names of the screen sessions - change as necessary | |
set screen_names to {"tfg_1", "tfg_2", "tfg_3", "tfg_4"} | |
-- Make our settings globally available | |
global tab_count, screen_names | |
-- Mainline |
>> c = Factory(:credit_card) | |
=> #<CreditCard id: 2, first_name: "Royce", last_name: "Ritchie", number: "4ioaILZVhGjVtdV7yJXBUFl8o6c2LeqPQAkRPSnUHl4=\n", month: 10, year: 2010, scheme: "visa", start_month: nil, start_year: nil, issue_number: nil, created_at: "2009-10-28 14:31:10", updated_at: "2009-10-28 14:31:10", friendly_name: nil, token: "f55440238e4dda3298ee9c625c00494ba6608000"> | |
>> c.number.decrypt(PASSWORD) | |
=> "4242424242424242" | |
>> c.number = '4242424242424241' | |
=> "4242424242424241" | |
>> c.save | |
=> false | |
>> c.number.decrypt(PASSWORD) | |
=> "4242424242424241" |
** What did you do to get good at Rails? | |
ML: The only thing you can do is cut code. You can read all the books, | |
watch all the screencasts and subscribe to all the blogs in the world, | |
but until you start writing your own code, you won't get experience and | |
you won't become proficient in Rails. | |
** Who taught you what you know? | |
ML: Railscasts with Ryan Bates is the obvious one, but lately I've really |
mlambie@prowl:~$ grep mlambie /etc/passwd | |
mlambie:x:1000:1001:Matthew Lambie,,,:/home/mlambie:/bin/bash | |
mlambie@prowl:~$ grep mlambie /etc/passwd | sed 's/Matthew/Andrew/' | |
mlambie:x:1000:1001:Andrew Lambie,,,:/home/mlambie:/bin/bash |
# The desired array | |
frequencies = ["hourly", "daily", "weekly", "monthly"] | |
# Shorthand conversion into array | |
frequencies = %w{hourly daily weekly monthly} | |
# Note the delimiter is not important, but must match | |
frequencies = %w"hourly daily weekly monthly" | |
frequencies = %w|hourly daily weekly monthly| |