Skip to content

Instantly share code, notes, and snippets.

View ebetancourt's full-sized avatar
Working

Elliot Betancourt ebetancourt

Working
View GitHub Profile
@ebetancourt
ebetancourt / gist:3194974
Last active October 7, 2015 16:38 — forked from matiskay/gist:3181894
Clean Install – Mountain Lion OS X 10.8 DP3
@ebetancourt
ebetancourt / development.rb
Created May 10, 2012 17:07 — forked from MyArtChannel/development.rb
Use Pry as IRB replacement in rails 3 console
# Add this to the end of your development.rb and add
#
# gem 'pry'
#
# to your Gemfile and run bundle to install.
silence_warnings do
begin
require 'pry'
IRB = Pry
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Market - responsive Newsletter with Template Builder</title>
</head>
<body>
<style type="text/css">
class ApplicationController < ActionController::Base
def switch_database_connection
ActiveRecord::Base.establish_connection "production_user_fallback"
end
end
javascript:
// Take the current page URL and put it in a variable called url
var url = document.URL;
// Create a new variable called tweetbotProfile and replace the mobile twitter url with the Tweetbot x-callback-url scheme
var tweetbotProfile = url.replace(/https:\/\/(mobile.)?twitter.com\//,"tweetbot:///user_profile/");
// Go to the new URL in tweetbotProfile
window.location = tweetbotProfile;