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
>> 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" |
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
-- 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 |
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
<?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); |
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
#!/bin/bash | |
git log --oneline --reverse --since="midnight" --author="mlambie" |
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
#!/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" |
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
# Recursion | |
def recursive x | |
return if x >= 10 | |
puts x | |
recursive x + 1 | |
end | |
recursive 0 |
NewerOlder