Skip to content

Instantly share code, notes, and snippets.

View macarthy's full-sized avatar
💭
Looking for work

Justin MacCarthy macarthy

💭
Looking for work
View GitHub Profile
for (var i=1; i < data.page_count; i++) {
$('#pageNav').append('<a href="#">'+ i + '</a>');
console.info(i);
$('#pageNav a:last').bind("click", function(){ alert( i });
if (i == 9) { if (data.page_count > 12) { $('#pageNav').append('...'); i = data.page_count - 3; } }
};
subject,count
node.js,11
mobile web,8
java,8
python,5
web development,5
mobile apps,5
networking,4
android,4
etc.,4
$('#brightness_slider').slider( {
min: 0,
max: 24,
value: 5,
slide: function(event, ui) {
$("#brightness_current_value").text(ui.value);
UpdateThing();
},
stop: function(event, ui) {
$("#brightness_current_value").text($('#brightness_slider').slider('value'));
#!/bin/bash
# Inspired by http://blog.fiveruns.com/2008/9/24/rails-automation-at-slicehost
yum install -y l gcc-c++ zlib-devel openssl-devel
yum install -y mysql-server mysql-devel
/etc/init.d/mysqld start
yum install -y ruby rdoc ruby-devel
RUBYGEMS="rubygems-1.3.1"
wget http://rubyforge.org/frs/download.php/45905/$RUBYGEMS.tgz
[2009-11-25 15:14:27] ./configure
-bash: ./configure: No such file or directory
[2009-11-25 15:14:27] ./configure
[2009-11-25 15:14:27] /Users/macarthy/.rvm/rbx-head/bin/gem install rake --no-rdoc --no-ri -q
-bash: /Users/macarthy/.rvm/rbx-head/bin/gem: No such file or directory
[2009-11-25 15:14:27] /Users/macarthy/.rvm/rbx-head/bin/gem install rake --no-rdoc --no-ri -q
[2009-11-25 15:14:27] $(rvm 1.8.7 ; rake)
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/Users/macarthy/.rvm/gems/ruby/1.8.7/gems/rake-0.8.7/lib/rake.rb:2377:in `raw_load_rakefile'
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "gist"
Gist.clear
Gist.process_selection
Gist.write(ARGV[0] == "private")
# remove Prototype defaults
run "rm public/javascripts/controls.js"
run "rm public/javascripts/dragdrop.js"
run "rm public/javascripts/effects.js"
run "rm public/javascripts/prototype.js"
# add XHTML 1.0 Strict layout, with jQuery from Google
file 'app/views/layouts/application.html.erb', <<-ERB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
# require gems
gem 'webrat'
gem 'capybara'
gem 'database_cleaner'
gem 'cucumber-rails'
gem 'cucumber', '0.7.2'
gem 'rspec-rails', '2.0.0.beta.8'
gem 'spork'
gem 'launchy' # So you can do Then show me the page
script/generate gives me :
Rubygems: cucumber, culerity, feature, form, formtastic, formtastic_stylesheets, nifty_authentication, nifty_config, nifty_layout, nifty_scaffold, revisable_migration, session
Builtin: controller, helper, integration_test, mailer, metal, migration, model, observer, performance_test, plugin, resource, scaffold, session_migration
> bundle exec script/generate
Usage: script/generate generator [options] [args]
Rails Info:
~/projects/git/manFS > rvm info
ruby-1.8.7-p249@manfs:
system:
uname: "Darwin boole.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"
rvm: