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
# Implements the "missing action" route by default | |
# see http://thelucid.com/2010/03/15/rails-can-we-please-have-a-delete-action-by-default/ | |
ActionController::Resources::Resource.class_eval do | |
def add_default_actions_with_delete_action | |
add_default_actions_without_delete_action | |
add_default_action(member_methods, :get, :delete) | |
end | |
alias_method_chain :add_default_actions, :delete_action |
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
function parseXml(xml) | |
{ | |
var i = -1; | |
var groupArray = new Array(); | |
j$(xml).find("pic").each(function() | |
{ | |
i++; | |
var name = "gallery/" + j$(this).find('name').text(); | |
var thumb = "gallery/thumbs/" + j$(this).find('thumb').text(); | |
var group = j$(this).find('group').text(); |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
def option | |
puts 'hello from option' | |
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
require 'parslet' | |
class Docopt < Parslet::Parser | |
# ========== | |
# = Basics = | |
# ========== | |
# Simple Tokens | |
rule(:equals) { str('=') } | |
rule(:newline) { str("\n") } |
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
# config/initializers/source_maps.rb | |
if Rails.env.development? | |
require 'open3' | |
module CoffeeScript | |
class SourceMapError < StandardError; end; | |
class << self | |
def map_dir |
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
# Moved to https://github.com/alexspeller/ember-query |
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
// Last commit: 36d2e2a (2013-03-11 17:37:25 -0700) | |
(function() { | |
window.DS = Ember.Namespace.create({ | |
// this one goes past 11 | |
CURRENT_API_REVISION: 12 | |
}); | |
})(); |
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
{ | |
"my_models": [ | |
{ | |
"id": 1, | |
"name": "model 1" | |
}, | |
{ | |
"id": 2, | |
"name": "model 2" | |
}, |
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
{ | |
"my_models": [ | |
{ | |
"id": 1, | |
"name": "model 1" | |
}, | |
{ | |
"id": 2, | |
"name": "model 2" | |
}, |
OlderNewer