This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
mff.bookmarklet.css | |
version 0.0.1 | |
*/ | |
#mff-netflix-control-panel { | |
background-color: #ddd; | |
border: 1px solid red; | |
border-radius: 6px; | |
position: absolute; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* mff.bookmarklet | |
version 0.0.6 | |
*/ | |
// Lazy initialize our namespace context: mff.bookmarklet | |
if (typeof(mff) == 'undefined') mff = { }; | |
if (typeof(mff.cookie) == 'undefined') mff.cookie = { }; | |
Base64 = {_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f<e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f<e.length){s=this._keyStr.indexOf(e.charAt(f++));o=this._keyStr.indexOf(e.charAt(f++));u=this._keyStr.indexOf(e.charAt(f++));a=this._keyStr.indexOf(e.charAt(f++));n=s<<2|o>>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+S |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add the following line to your existing .bashrc | |
# Note the double quotes on the path next to source | |
[[ -s $USERPROFILE/.pik/.pikrc ]] && source "$USERPROFILE/.pik/.pikrc" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These are the basic steps to use the twitter gem from @jnunemaker | |
# | |
# 1. Install the gem: gem install twitter | |
# | |
# 2. Login to Twitter and register your application. | |
# | |
# Note: it looks like you cannot use a url like http://locahost:3301/ (bummer) | |
# An easy alternative is to create an app on Heroku. | |
# | |
# IMPORTANT: Make sure that the callback url looks like this: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prerequisites: | |
# 1) Install VIM | |
# 2) gem install interactive_editor | |
# ------------------------- | |
require 'rubygems' | |
require 'interactive_editor' | |
DEFAULT_IRB_SESSION_FILE = 'my_irb_session.rb' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 15-minutes with IronRuby and MongoDB | |
# ------------------------------------ | |
# Prerequisites: | |
# 1) Download and extract the IronRuby zip from http://ironruby.net/download to C:\ironruby-1.0v4 | |
# 2) Add the C:\ironruby-1.0v4\bin folder of your IronRuby installation folder to your PATH system environment variable | |
# | |
# 3) Download and extract the MongoDB for Windows zip from http://www.mongodb.org/display/DOCS/Downloads to C:\MongoDB | |
# 4) Create a C:\data\db directory | |
# 5) Start the mongod.exe from the bin folder of your MongoDB installation folder | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'camping' , '>= 2.0' | |
gem 'mongo', '= 1.0' #Using 1.0 since MongoMapper explicitly | |
%w(rack camping mongo mongo_mapper).each { | r | require r} | |
Camping.goes :MongoTest | |
module MongoTest | |
def self.create | |
MongoMapper.connection = Mongo::Connection.new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Options +FollowSymLinks +ExecCGI | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ /dispatch.fcgi/$1 [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L] | |
ErrorDocument 500 "Application error: Ruby Camping application failed to start properly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
#require 'ruby-debug' # @techarch : commented out since only needed for local debugging | |
require 'markaby' # @techarch : added explicit require | |
require 'camping' # @techarch | |
require 'camping/session' # @techarch : added explicit require since session has changed in Camping 2.0 | |
gem 'RedCloth' # @techarch : added since it is referenced in the Posts model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MyApp::Controllers | |
class Test1 < R '/test1' | |
end | |
class Test2 < R '/test2' | |
end | |
SITE_BASE_URL = "http://www.myapp.com" | |
# --- --- --- |