save_and_open_page
have_button(locator)
(defun camelcase-region (start end) | |
"Changes region from snake_case to camelCase" | |
(interactive "r") | |
(save-restriction (narrow-to-region start end) | |
(goto-char (point-min)) | |
(while (re-search-forward "_\\(.\\)" nil t) | |
(replace-match (upcase (match-string 1)))))) |
#!/bin/bash | |
for arg; do [[ $arg = /* ]] || arg=$PWD/$arg; absargs+=("$arg"); done; | |
/Applications/p4merge.app/Contents/Resources/launchp4merge "${absargs[@]}" |
~/projects ➔ gem install cloby | |
Successfully installed cloby-0.0.1-java | |
1 gem installed | |
Installing ri documentation for cloby-0.0.1-java... | |
Installing RDoc documentation for cloby-0.0.1-java... | |
~/projects ➔ cat simple.rb | |
require 'cloby' | |
class MyClojureObj < Clojure::Object |
# monkey-patch irb. see: http://jameskilton.com/2009/04/02/embedding-irb-into-your-ruby-application/ | |
# | |
require 'irb' | |
module IRB # :nodoc: | |
def self.start_session(binding) | |
unless @__initialized | |
args = ARGV | |
ARGV.replace(ARGV.dup) | |
IRB.setup(nil) |
namespace :pg do | |
namespace :structure do | |
# Does exactly the same as db:structure:dump but with one important | |
# difference. It tries to use a compatible version of pg_dump. If you see | |
# the following error message, use pg:structure:dump instead. | |
# | |
# pg_dump: server version: 9.1.0; pg_dump version: 9.0.4 | |
# pg_dump: aborting because of server version mismatch | |
# rake aborted! | |
# Error dumping database |
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# == Synopsis | |
# Proof of concept using Fuzzy File Finder to locate a script to edit | |
# Searches a set of predefined locations for a fuzzy string | |
# e.g. "mwp" matches both "myweatherprogram" and "mowthelawnplease" | |
# ................on "(m)y(w)eather(p)rogram" and "(m)o(w)thelawn(p)lease" | |
# | |
# Results are ranked and a menu is displayed with the most likely | |
# match at the top. Editor to be launched and directories to search |
#!/usr/bin/env ruby | |
# API Documentation at http://api.wikia.com/wiki/LyricWiki_API | |
require 'open-uri' | |
require 'json' | |
require 'tmpdir' | |
ARTIST = "Johnny Cash" |
#!/usr/bin/env ruby | |
# API Documentation at http://api.wikia.com/wiki/LyricWiki_API | |
require 'open-uri' | |
require 'json' | |
require 'tmpdir' | |
def itunes_song | |
`osascript -e 'tell application "iTunes" to (get name of current track) & "\n" & (get artist of current track)' 2>/dev/null`.split("\n") |
With Heroku's JRuby support you may have already seen that you can run TorqueBox Lite on Heroku. But, that only gives you the web features of TorqueBox. What about scheduled jobs, backgroundable, messaging, services, and caching?
With a small amount of extra work, you can now run the full TorqueBox (minus STOMP support and clustering) on Heroku as well! I've successfully deployed several test applications, including the example Rails application from our Getting Started Guide which has a scheduled job, a service, and uses backgroundable and messaging.
This example uses TorqueBox 3.0.2, but the instructions may work with other TorqueBox versions.