Skip to content

Instantly share code, notes, and snippets.

View MSch's full-sized avatar

Martin Schürrer MSch

View GitHub Profile
@tomdale
tomdale / gist:1856842
Created February 18, 2012 01:54
Ember documentation TODO

Documentation

TODO

  • API docs
  • How to bootstrap a project
  • Application structure (M/V/C layers and what they're for)
  • Getting started with Ember and Rails
  • Built-in controls
  • How events are handled and bubbled
@MSch
MSch / jquery-ui-1.9m7.js
Created April 29, 2012 19:09
jQuery UI 1.9m7
/*!
* jQuery UI 1.9m7
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI
*/
(function( $, undefined ) {
@kommen
kommen / deploy.rb
Created July 17, 2012 16:03
Cap task to only precompile rails 3.1 assets if asset files have changed
set :branch, "origin/#{ENV['BRANCH'] || "master"}"
namespace :assets do
desc "Precompile rails 3.1 assets"
task :precompile, :except => { :no_release => true } do
asset_paths = "app/assets lib/assets vendor/assets"
if !ENV['FORCE_PRECOMPILE'].nil? || capture("cd #{current_path}; git diff-tree --name-only -r #{deployed_revision} HEAD #{asset_paths} | wc -l").strip.to_i > 0
deploy.precompile_assets
else
logger.info "Skipping asset pre-compilation because there were no asset changes"
@josevalim
josevalim / 0_README.md
Created September 13, 2012 21:52
Sinatra like routes in Rails controllers

Sinatra like routes in Rails controllers

A proof of concept of having Sinatra like routes inside your controllers.

How to use

Since the router is gone, feel free to remove config/routes.rb. Then add the file below to lib/action_controller/inline_routes.rb inside your app.