Embeds SQL syntax highlighting inside Ruby heredocs labeled SQL. This will also work to embed other syntaxen, e.g., HTML.
(requires https://github.com/exu/pgsql.vim)
syntax include @SQL syntax/pgsql.vimEmbeds SQL syntax highlighting inside Ruby heredocs labeled SQL. This will also work to embed other syntaxen, e.g., HTML.
(requires https://github.com/exu/pgsql.vim)
syntax include @SQL syntax/pgsql.vim| require "net/http" | |
| # Example Usage: | |
| # | |
| # use Rack::Proxy do |req| | |
| # if req.path =~ %r{^/remote/service.php$} | |
| # URI.parse("http://remote-service-provider.com/service-end-point.php?#{req.query}") | |
| # end | |
| # end | |
| # |
| # Get the latest Sun Java SDK from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html | |
| wget http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.rpm | |
| # Rename the file downloaded, just to be nice | |
| mv jdk-7u1-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u1-linux-i586.rpm | |
| # Install Java | |
| sudo rpm -i jdk-7u1-linux-i586.rpm | |
| # Check if the default java version is set to sun jdk |
| class window.PlacementFiltersView extends Backbone.View | |
| el: "#placements form#filters" | |
| initialize: -> | |
| currentView = @ | |
| # Create a hash of labels for the filter type-aheads | |
| @filterLabels = [] | |
| jQuery(@el).find('.filter-top-level option').each -> | |
| if jQuery(@).val() isnt '' |
| module ActiveRecord | |
| module ConnectionAdapters | |
| class AbstractAdapter | |
| protected | |
| # Turn: | |
| # User Load (6.3ms) SELECT * FROM "users" | |
| # Into: | |
| # User Load /app/views/_partial.erb:27 (6.3ms) in `_app_views_partial_erb` SELECT * FROM "users" |
| #!/usr/bin/env ruby | |
| # Merges the current branch into the specified branch after checking out that branch. | |
| # Usage: | |
| # git merge-into [branch] | |
| # [branch] defaults to "master" if not specified | |
| # "sprint" is my convenience library for handling external processes. |
| export RUBY_HEAP_MIN_SLOTS=1000000 | |
| export RUBY_HEAP_SLOTS_INCREMENT=1000000 | |
| export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
| export RUBY_GC_MALLOC_LIMIT=1000000000 | |
| export RUBY_HEAP_FREE_MIN=500000 |
| This example shows how to setup an environment running Rails 3 beta under 1.9.1 with a 'rails3' gem set. | |
| ∴ rvm update --head | |
| # ((Open a new shell)) or do 'rvm reload' | |
| # If you do not already have the ruby interpreter installed, install it: | |
| ∴ rvm install 1.9.1 | |
| # Switch to 1.9.1 and gemset rails3, create if it doesn't exist. | |
| ∴ rvm --create use 1.9.1@rails3 |
| namespace :prune do | |
| desc "Delete all unnecessary files from vendored Rails" | |
| task :rails do | |
| require 'fileutils' | |
| list = Dir.glob("vendor/rails/*/test") | |
| FileUtils.rm_rf list, :verbose => true unless list.empty? | |
| end |
| tell application "Terminal" | |
| activate | |
| do script with command "cd ~/my/development/directory" | |
| do script with command "cd ~/my/development/directory; mate ." | |
| do script with command "cd ~/my/development/directory; script/server" | |
| do script with command "cd ~/my/development/directory; script/console" | |
| do script with command "cd ~/my/development/directory; autotest" | |
| end tell |