❤️🔥
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
* [AdvancedNewFile](https://github.com/skuroda/Sublime-AdvancedNewFile) | |
* [AngularJS](https://github.com/angular-ui/AngularJS-sublime-package) | |
* [AngularJS (CoffeeScript)](https://github.com/Iristyle/Sublime-AngularJS-Coffee-Completions) | |
* [AngularJS Snippets](https://github.com/maxhoffmann/angular-snippets) | |
* [ApplySyntax](https://github.com/facelessuser/ApplySyntax) | |
* [Automatic Backups](https://github.com/joelpt/sublimetext-automatic-backups) | |
* [BracketHighlighter](https://github.com/facelessuser/BracketHighlighter) | |
* [ChangeQuotes](https://github.com/colinta/SublimeChangeQuotes) | |
* [Clipboard History](https://github.com/kemayo/sublime-text-2-clipboard-history) | |
* [Coffee Formatter](https://github.com/derekchiang/Sublime-CoffeeScript-Formatter) |
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
# Usage sample: | |
# elements - any collection of your elements, so in this example i have: | |
# class Element | |
# attr_reader :title1, :title2, :content | |
# end | |
# elements = Array.new(5, Element) | |
# Somewhere in your controller: | |
def report |
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
include Java | |
# Here's where is my "somelib.jar" located | |
Dir["lib/java/\*.jar"].each { |jar| require jar } | |
include MyClass | |
# .... |
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
app_name = "myApp" | |
app = angular.module "#{app_name}.controllers", [] | |
class BaseController | |
@register: (app, name) -> | |
name ?= @name || @toString().match(/function\s*(.*?)\(/)?[1] | |
app.controller name, @ | |
@inject: (args...) -> | |
@$inject = args |
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 @Base | |
constructor: (args...) -> | |
for key, index in @constructor.$inject | |
@[key] = args[index] | |
@inject: (args...) -> @$inject = _.union @$inject args | |
class @BaseCtrl extends @Base | |
constructor: (args...) -> |
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
module APICommonHelpers | |
def access_denied!(message = 'Access denied') | |
error! message, 401 | |
end | |
def bad_request!(message = 'Bad request') | |
error! message, 400 | |
end | |
def forbidden_request!(message = 'Forbidden') |
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
require 'active_support/core_ext/hash' | |
require 'capistrano/undev' | |
require 'capistrano-db-tasks' | |
require 'airbrake/capistrano3' | |
require './config/boot' | |
SSHKit.config.command_map[:rake] = 'bundle exec rake' |
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
CXX=clang++ | |
FLAGS=-std=c++11 -stdlib=libc++ | |
all: | |
clean: | |
rm -fr build/* | |
test: | |
$(CXX) $(FLAGS) src/test.cpp -o build/test.bin -Isrc/ | |
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
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
## Uncomment and set this to only include directories you want to watch | |
# directories %w(app lib config test spec feature) | |
## Uncomment to clear the screen before every task | |
# clearing :on | |
## Guard internally checks for changes in the Guardfile and exits. |
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 I18nTimeZone < ActiveSupport::TimeZone | |
class << self | |
def all | |
TZInfo::Timezone.all.map do |tzinfo| | |
utc_offset = tzinfo.current_period.utc_offset | |
create(tzinfo.name, utc_offset, tzinfo) | |
end | |
end | |
end |
OlderNewer