Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
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 is there http://github.com/spyou/vim-config | |
#Give a go to vimtutor in order to have a little overview of Vim. | |
"open/save" | |
#:w (save) | |
#:q (quit) | |
#:qa (quit all buffers) | |
#:q! (quit without saving) | |
#:wq (save and quit) |
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 'rake/clean' | |
HAML = FileList['**/*.haml'] | |
LESS = FileList['**/*.less'] | |
COFFEE = FileList['**/*.coffee'] | |
HTML = HAML.ext('html') | |
CSS = LESS.ext('css') | |
JS = COFFEE.ext('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 ruby | |
# encoding: utf-8 | |
require "find" | |
require "eventmachine" | |
# === Usage === | |
# project-watcher.rb --no-daemon -- run | |
# project-watcher.rb -- run as a daemon | |
# project-watcher.rb --debug -- run in debug mode |
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
# Put this content to ~/.irbrc file (no extension) | |
require "rubygems" | |
begin | |
require "ap" | |
rescue LoadError => err | |
puts "Cannot find awesome_print gem. Please run 'gem install awesome_print' to install it." | |
end |
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
.gmap.map-preview | |
:width 540px | |
:height 400px | |
:margin 5px auto | |
:border 5px solid #DDD | |
:background #F1F1F1 url('/images/map-placeholder.jpg') center center no-repeat |
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
# generate random sequence | |
#SecureRandom also has methods for: base64, hex, bytes, random_number | |
#see: http://api.rubyonrails.org/classes/ActiveSupport/SecureRandom.html | |
require 'active_support/secure_random' | |
ActiveSupport::SecureRandom.hex(16) | |
# outputs: 6dc19d21e958e04645cddadb96e9c927 |
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
// | |
// JS Prompt - a Talker plugin <http://talkerapp.com> | |
// | |
// to activate/deactivate the js prompt: /prompt | |
// to share variables amongst users: this.foo = 1; | |
// | |
plugin.usage = '/prompt'; | |
plugin.command = 'prompt'; | |
plugin.evalMode = false; | |