⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains 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
source 'https://rubygems.org' | |
gem 'rails', '3.2.13' | |
gem 'jquery-rails' | |
# A Scope & Engine based, clean, powerful, customizable and sophisticated paginator | |
gem "kaminari" | |
# Compass is a Stylesheet Authoring Environment that makes your website design simpler to implement and easier to maintain. |
This file contains 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
class config::sublime { | |
define addpkg { | |
$packagedir = "/Library/Application Support/Sublime Text 2/Packages/" | |
$pkgarray = split($name, '[/]') | |
$pkgname = $pkgarray[1] | |
exec { "git clone https://github.com/${name}.git": | |
cwd => "/Users/${::luser}${packagedir}", | |
provider => 'shell', |
This file contains 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
class config::sublime { | |
define addpkg { | |
$packagedir = "/Library/Application Support/Sublime Text 2/Packages/" | |
$pkgarray = split($name, '[/]') | |
$pkgname = $pkgarray[1] | |
exec { "git clone https://github.com/${name}.git": | |
cwd => "/Users/${::luser}${packagedir}", | |
provider => 'shell', |
This file contains 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
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
This file contains 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
#!/bin/sh | |
# This is a sample script for kickstarting a VM according to the openshift.ks script under virt-manager, qemu+KVM, and Linux. | |
# You certainly need to modify at least the CMDLINE and --location below for it to be useful (unless you work at Red Hat). | |
set -e | |
if [ $# -lt 1 ] | |
then | |
printf 'Usage: %s vm_name [arg1 [arg2 [...]]]\n' "$0" |
This file contains 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 ruby | |
#Place this in your root directory of your rails app | |
#Ensure that you have install thor gem | |
#To list the command, type 'thor -T' | |
module Heroku | |
class Db < Thor | |
desc "production_to_local", "clone a remote heroku database to the local environment" | |
method_option :remote_production, :type => :string, :default => 'production' |
This file contains 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
# place this file in ~/.config/terminator/config | |
[global_config] | |
title_transmit_bg_color = "#d30102" | |
focus = system | |
[keybindings] | |
reset_clear = <Ctrl>R | |
new_tab = <Ctrl>T | |
split_horiz = <Ctrl><Shift>E | |
split_vert = <Ctrl>E | |
close_term = <Ctrl><Shift>W |
This file contains 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
Spree::Order.class_eval do | |
silence_warnings do | |
state_machines.clear | |
#override state_machine to add choose_reward step | |
state_machine :initial => 'cart', :use_transactions => false do | |
event :next do | |
transition :from => 'cart', :to => 'address' | |
transition :from => 'address', :to => 'delivery' | |
transition :from => 'delivery', :to => 'payment', :if => :payment_required? | |
transition :from => 'delivery', :to => 'complete' |