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
set -g -x PATH /usr/local/bin $PATH | |
set -g -x fish_greeting '' | |
# Compilation flags | |
set ARCHFLAGS="-arch x86_64" | |
set RUBY_GC_HEAP_INIT_SLOTS=1000000 | |
set RUBY_HEAP_SLOTS_INCREMENT=1000000 | |
set RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
set RUBY_GC_MALLOC_LIMIT=100000000 |
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
import sublime, sublime_plugin | |
import os | |
class DetectFileTypeCommand(sublime_plugin.EventListener): | |
""" Detects current file type if the file's extension isn't conclusive """ | |
""" Modified for Ruby on Rails and Sublime Text 2 """ | |
""" Original pastie here: http://pastie.org/private/kz8gtts0cjcvkec0d4quqa """ | |
def on_load(self, view): | |
filename = view.file_name() |
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
# config/initializers/buffered_logger.rb | |
module ActiveSupport | |
# Format the buffered logger with timestamp/severity info. | |
class BufferedLogger | |
NUMBER_TO_NAME_MAP = {0=>'DEBUG', 1=>'INFO', 2=>'WARN', 3=>'ERROR', 4=>'FATAL', 5=>'UNKNOWN'} | |
NUMBER_TO_COLOR_MAP = {0=>'0;37', 1=>'32', 2=>'33', 3=>'31', 4=>'31', 5=>'37'} | |
# http://api.rubyonrails.org/classes/Time.html#method-i-2D | |
DATE_FORMATTER = {0 => :db, 1 => :short, 2 => :long, 3 => :time} |
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
<div data-replace="item"> | |
PARTIAL 1: <span data-bind="item.name"></span> | |
</div> |
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
# controllers/dummy_controller.coffee | |
MyApp.flashSuccess "Record updated successfully!" |
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
# controllers/dummy_controller.coffee | |
Classifieds.set "flash.success", "Record #{@get('record.title')} updated successfully!" |
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
var HotelDescription = (function ($) { | |
"use strict"; | |
var HotelDescription = function ($element) { | |
this.$long = $('.long-description', $element); | |
this.$short = $('.short-description', $element); | |
this.$more = $('.read-more', $element); | |
this.$less = $('.read-less', $element); | |
this.bind(); |
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
// Generated on 2013-09-27 using generator-angular 0.4.0 | |
'use strict'; | |
var path = require('path'); | |
// # Globbing | |
// for performance reasons we're only matching one level down: | |
// 'test/spec/{,*/}*.js' | |
// use this if you want to recursively match all subfolders: | |
// 'test/spec/**/*.js' |
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 sh | |
blue="\033[34m" | |
reset="\033[0m" | |
red="\033[31m" | |
green="\033[32m" | |
function warn { | |
echo "$1" > /dev/stderr | |
} |
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 sh | |
set -e | |
blue="\033[34m" | |
reset="\033[0m" | |
red="\033[31m" | |
function warn { | |
echo "$1" > /dev/stderr |