Basic example, replace .ajax-form with whatever form you want to select:
$('.ajax-form').snippet_ajax_form();
Example using options:
$.fn.snippet_ajax_form.defaults= { hide_on_success: true };
#Deploy and rollback on Heroku in staging and production | |
task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
namespace :deploy do | |
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU' | |
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU' | |
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag] | |
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on] |
// jslint.js | |
// 2010-08-08 | |
/* | |
Copyright (c) 2002 Douglas Crockford (www.JSLint.com) | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies |
" by CJ Lazell github.com/cj | |
" based on - http://github.com/solars/github-vim/ | |
if exists("loaded_github") || &cp | |
finish | |
endif | |
" --- main functions --- " |
<html> | |
<head></head> | |
<body style="background-color:#ffffff;margin:10px"> | |
<script> | |
var uploadFile = function(){ | |
var text = document.getElementById('txt'); | |
var dir = Titanium.Filesystem.getResourcesDirectory(); | |
sep = Titanium.Filesystem.getSeparator(), | |
// filename = 'test.txt', |
# Module Dependencies | |
express = require 'express' | |
app = module.exports = express.createServer(); | |
# Configuration | |
app.configure () -> | |
app.set 'views', "#{__dirname}/views" | |
app.set 'view engine', 'jade' |
rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..' | |
rails_env = ENV['RAILS_ENV'] || 'development' | |
resque_config = YAML.load_file(rails_root + '/config/resque.yml') | |
Resque.redis = resque_config[rails_env] | |
#secure the admin view of resque | |
Resque::Server.use(Rack::Auth::Basic) do |user, password| | |
password == "secret" | |
end |
// main app.js | |
var client = require('ranger').createClient('ROOM', | |
'SECRET'); | |
var timestamp = require('./timestamp').timestamp; | |
var getWeatherWrapper = require('./weather').getWeatherWrapper; | |
var showMap = require('./map').showMap; | |
var getTweets = require('./tweets').getTweets; | |
client.room(ROOMID, function(room) { |
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.
Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'