most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat| Some brief instructions on how to use Sprocket 2 in Rails to get CoffeeScript | |
| powered JS and SASS powered CSS with YUI compression all via the magic of rack. | |
| This stuff will be native in Rails 3.1 and the layout of the files on the | |
| filesystem will be different but this guide will get you working with it | |
| while we wait for all that to finalize. | |
| Ignore the number prefixes on each file. This is just to ensure proper order in the Gist. | |
| It's based on eric1234 gist https://gist.github.com/911003. ijust made it 3.1 compliant in terms of convention |
| 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() |
| #!/usr/bin/env ruby | |
| # A simple script to gzip content recursively. I use it for the Nginx gzip_static module. | |
| require 'find' | |
| EXTENSIONS = %w(.js .html .css) | |
| def gzname(file) | |
| "#{file}.gz" |
| # I stole this code from em-mysql (tmm1 <3) | |
| module Sequel | |
| class Database | |
| attr_accessor :_async | |
| end | |
| class Dataset | |
| def async_insert *args, &cb | |
| db._async.insert insert_sql(*args), &cb | |
| nil |