Skip to content

Instantly share code, notes, and snippets.

View mikeymicrophone's full-sized avatar

Mike Schwab mikeymicrophone

View GitHub Profile
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
@mikeymicrophone
mikeymicrophone / class projects
Created January 8, 2012 21:35
ideas for group projects, Ruby class 3rd Ward Brooklyn
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
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
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
NSArray *comments;
@try {
comments = [self allFromXMLData:res.body];
}
@catch (NSRangeException *e) {
comments = [NSArray array];
}
@catch (NSException *e) {
comments = [NSArray array];
}
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"];
# 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
# 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
require 'http_require'
require 'http://github.com/why/camping/raw/master/lib/camping.rb'
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;');
});