This file contains hidden or 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
| class Animal | |
| def initialize | |
| end | |
| def talk | |
| raise NotImplementedError("Subclass must implement abstract method") | |
| end | |
| end | |
| class Cat | |
| def talk |
This file contains hidden or 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
| # THIS | |
| def classrooms_in_same_building | |
| return [] unless building | |
| Classroom.where(:building_id => building.id) | |
| end | |
| # | |
| # THIS VS THAT! | |
| # |
This file contains hidden or 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
| "Pick the right ones, and programming will flow naturally from design; | |
| modules will have small and simple interfaces; and new functionality will | |
| more likely fit in without extensive reorganization. | |
| Pick the wrong ones, and programming will be a series of nasty surprises: | |
| interfaces will become baroque and clumsy as they are forced to accommodate | |
| unanticipated interactions, and even the simplest of changes will be hard to make." | |
| MIT Professor Daniel Jackson |
This file contains hidden or 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/sh | |
| # this script greps .rb files on the the current directory recursively for a word displaying the line, line number and file path. | |
| # greps recursively ruby files and displaing lines | |
| grep -r -n --include="*.rb" $1 . | | |
| # strip white spaces | |
| tr -d ' '| |
This file contains hidden or 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
| --colour | |
| -I app |
This file contains hidden or 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
| A comment that sheds light on this comes from Steve Jobs, CEO of Apple: | |
| When you start looking at a problem and it seems really simple, you don't really understand the complexity of the problem. Then you get into the problem, and you see that it's really complicated, and you come up with all these convoluted solutions. That's sort of the middle, and that's where most people stop.... | |
| But the really great person will keep on going and find the key, the underlying principle of the problem—and come up with an elegant, really beautiful solution that works. | |
| That's what we wanted to do with Mac. | |
| —from Insanely Great, written by Steven Levy |
This file contains hidden or 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
| [ | |
| {"_id":null,"created_at":"2012-08-07T05:00:00Z","date":"May","ingredients":"Coffee","updated_at":null,"user_id":null}, | |
| {"_id":null,"created_at":"2012-08-08T05:00:00Z","date":"May","ingredients":"Lentil Soup","updated_at":null,"user_id":null} | |
| ] |
This file contains hidden or 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
| { "insights":[ | |
| {"_id":"50219791b31c8f2172000007","created_at":"2012-08-07T22:32:49Z","mensaje":"You are eating the perfect breakfast. Keep it up! ","score":null,"tag_line":null,"type":"happy","updated_at":"2012-08-07T22:32:49Z","user_id":"50202426b31c8f8c9e00000f"}, | |
| {"_id":"50218686b31c8f2172000006","created_at":"2012-08-07T21:20:06Z","mensaje":"Replace sugar in your coffee with cinnamon. ","score":null,"tag_line":null,"type":"warning","updated_at":"2012-08-07T21:20:06Z","user_id":"50202426b31c8f8c9e00000f"} | |
| ] | |
| } |
This file contains hidden or 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/sh | |
| # This will find any development.log file and remove it | |
| # <3 | |
| locate development.log | xargs -L1 rm |
This file contains hidden or 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
| TMUX: | |
| http://www.openbsd.org/cgi-bin/man.cgi?query=tmux&sektion=1#end | |
| http://www.youtube.com/watch?feature=player_embedded&v=4ErEBkj_3PY#t=888s | |
| http://www.dayid.org/os/notes/tm.html | |