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
| Here's some great instructions: | |
| http://www.frederico-araujo.com/2011/07/30/installing-rails-on-os-x-lion-with-homebrew-rvm-and-mysql/ | |
| Here's my version: | |
| First, install XCode, which will help you compile other software. If you have OSX 10.7 (Lion), you can install XCode via the Mac App Store. You can also register (for free) at developer.apple.com and get it from the downloads section of the iOS dev center. | |
| The newest version of XCode has a compiler called LLVM which apparently does not work with RVM's 1.9.2 installer. Use this tool to install the compiler called GCC. | |
| https://github.com/kennethreitz/osx-gcc-installer |
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
| side project | |
| - share projects | |
| - use social tools to push yourself | |
| info about candidates, policies | |
| - facebook connect | |
| - users can comment on why they support candidates | |
| local MCs | |
| - upload tracks |
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
| User.create :first_name => current_facebook_user.first_name, :last_name => current_facebook_user.last_name, | |
| :email => current_facebook_user.email, | |
| :facebook_id => current_facebook_user.id, | |
| :access_token => current_facebook_user.client.access_token, | |
| :city => current_facebook_user.location |
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 CommentsController | |
| def index | |
| @comments = if params[:book_id] | |
| @scope_object = Book.find(params[:book_id]) | |
| @scope_object.comments | |
| elsif params[:article_id] | |
| @scope_object = Article.find(params[:article_id]) | |
| @scope_object.comments | |
| else | |
| Comment.all |
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
| NSArray *comments; | |
| @try { | |
| comments = [self allFromXMLData:res.body]; | |
| } | |
| @catch (NSRangeException *e) { | |
| comments = [NSArray array]; | |
| } | |
| @catch (NSException *e) { | |
| comments = [NSArray array]; | |
| } |
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
| NSString *plist_path = [NSHomeDirectory() stringByAppendingPathComponent:@"audio_recording_number.plist"]; | |
| NSLog(@"plist path: %@", plist_path); | |
| NSLog(@"file exists: %i", [[NSFileManager defaultManager] fileExistsAtPath:plist_path]); | |
| if ([[NSFileManager defaultManager] fileExistsAtPath:plist_path]) { | |
| NSLog(@"found audio config file"); | |
| } else { | |
| NSLog(@"did not find audio config file"); | |
| audio_recording_number = [NSNumber numberWithInteger:0]; | |
| NSDictionary *audio_properties = [NSDictionary dictionaryWithObject:audio_recording_number forKey:@"number_of_recordings"]; |
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
| # to start at the beginning and walk through the revisions, use these links ------------------- | |
| #| | |
| class Slapper #| | |
| def slap #| | |
| before_slap #|----> | |
| puts "I just slapped something" | |
| end | |
| def before_slap | |
| end |
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 testing utility by Mike Harris | |
| class PersistantHash | |
| def [](k) | |
| f = File.dirname(__FILE__) + "/phash/#{k}" | |
| if File.exists?(f) | |
| File.open(f) { |x| Marshal.load(x) } | |
| else | |
| nil |
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
| require 'http_require' | |
| require 'http://github.com/why/camping/raw/master/lib/camping.rb' | |
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
| var in_subnav = false; | |
| function nap (m) {var then = new Date(new Date().getTime() + m); while (new Date() < then) {}} | |
| $(document).ready(function() { | |
| $('#navigation .baseball').mouseenter( function() { | |
| $('#baseball-regions').attr('style', 'left:50px;'); | |
| }); | |
| $('#baseball-regions a:contains(\'Northeast\')').mouseenter( function() { | |
| $('#northeast-areas').attr('style', 'left:100px;'); | |
| $('#southeast-areas').attr('style', 'left:-500px;'); | |
| }); |