Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Set/Get CP init issue?',
});
@spovich
spovich / ruby.rb
Last active December 29, 2015 03:38 — forked from phlipper/ruby.rb
add node default so it will compile
# ruby-install
ruby_install_version = node["ruby_install"]["version"]
ruby_install_url = "https://github.com/postmodern/ruby-install/archive/v#{ruby_install_version}.tar.gz"
ruby_install_dir = "ruby-install-#{ruby_install_version}"
ruby_install_tar = "#{ruby_install_dir}.tar.gz"
execute "Install ruby-install" do
cwd "/tmp"
command <<-EOC
curl -Lo #{ruby_install_tar} #{ruby_install_url} &&
@spovich
spovich / gist:1848409
Created February 16, 2012 22:35 — forked from dx7/gist:1333785
Installing ruby-debug with ruby-1.9.3-p125
# Install with:
# bash < <(curl -L https://raw.github.com/gist/1848409)
#
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug
echo "Installing ruby-debug with ruby-1.9.3-p125 ..."
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
# Fix for Zippy template handler loading
# Make template handler compatible with Rails 3.0.x and 3.1+
# Original https://github.com/toretore/zippy/blob/master/rails/init.rb
require 'zippy'
Mime::Type.register 'application/zip', :zip
module ActionView
module Template::Handlers
class Zipper
def sort_link(attribute, *args)
attr_name = attribute.to_s
name = (args.size > 0 && !args.first.is_a?(Hash)) ? args.shift.to_s : attr_name.humanize
prev_attr, prev_order = params['q'].nil? ? '' '' : params['q']['s'].to_s.split(' ')
options = args.first.is_a?(Hash) ? args.shift : {}
current_order = prev_attr == attr_name ? prev_order : nil
if options[:default_order] == :desc
new_order = current_order == 'desc' ? 'asc' : 'desc'