Instantly share code, notes, and snippets.

View phonemaintenance.xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say></Say>
<Pause length="2"/>
<Say>
Thank you for calling care zone. If this is a medical emergency, hang up and call 9 1 1.
Our phone system is down temporarily for maintenance. Please try again in a few minutes.
We are sorry for the inconvenience.
</Say>
<Hangup/>
View gist:8c07f89649d928f4f45368eaed2d8d72
<Response>
<Dial>
<User>sip:12067079127@prod-pbx-pub.czops.net:5080</User>
</Dial>
</Response>
View sip-to-7101.xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial>
<Sip>sip:7101@sip-dev.czops.net</Sip>
</Dial>
</Response>
View capybara-firebug.rb
# UPDATE: You are probably better off using jfirebaugh's gem.
# See https://github.com/jfirebaugh/capybara-firebug
# Set up Capybara to install Firebug in the default session.
#
# Download firebug.xpi from http://getfirebug.com/downloads and check it in.
# Set FirebugFix::ORIGINAL_XPI_PATH to its location.
require 'selenium/webdriver'
View DeviseJsonAdapter.rb
# JSON-encoded error and redirect results for Devise controllers.
# This overrides an internal method of Devise, so be careful when updating Devise!
#
# Usage:
#
# class Users::RegistrationsController < Devise::RegistrationsController
# include DeviseJsonAdapter
# end
#
# devise_for :users, :controllers => { :registrations => "users/registrations" }
View app_config.rb
# Simple configuration system
#
# The configuration is represented as a tree of keys. Examples:
#
# AppConfig['key']
# AppConfig['key','subkey']
# AppConfig['key.subkey']
#
# An optional default value can be specified:
#
View hamlcdata.rb
# Generates HAML surrounded by CDATA tags.
# Useful for JavaScript templates (e.g., jquery.mustache or jQote).
#
# Example:
# %script#foo_tmpl(type="text/x-mustache")
# :hamlcdata
# %p This is HAML enclosed in CDATA.
# %p You can use it for templating {{stuff}}.
# =>
# <script id='foo_tmpl' type='text/x-mustache'>