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
import Rails from '@rails/ujs' | |
const DirectUpload = { | |
start () { | |
document.addEventListener('direct-upload:initialize', DirectUpload.initialize) | |
document.addEventListener('direct-upload:start', DirectUpload.begin) | |
document.addEventListener('direct-upload:progress', DirectUpload.progress) | |
document.addEventListener('direct-upload-error', DirectUpload.error) | |
document.addEventListener('direct-upload:end', DirectUpload.end) | |
}, |
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
#!/bin/bash | |
if [ $# -ne 4 ] | |
then | |
echo "Usage: $0 <host> <port> <pattern> <seconds>" | |
exit 1 | |
fi | |
cursor=-1 | |
keys="" |
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 'benchmark' | |
REGEXPS = [ | |
/^no such file to load -- (.+)$/i, | |
/^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i, | |
/^Missing API definition file in (.+)$/i, | |
/^cannot load such file -- (.+)$/i, | |
] |
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
myproject() { | |
cd /Users/doug/development/myproject/ && rvm 1.8.7 | |
if [ "${1}" == "s" ]; then | |
script/server -u | |
fi | |
} |
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
#!/bin/sh | |
# You must have your virtualenv activated to run this script | |
NAME=gunicorn_timothyfletcher | |
PID=/home/fire/www/timothyfletcher.com/conf/gunicorn.pid | |
SETTINGS=/home/fire/www/timothyfletcher.com/timothyfletcher/settings.py | |
LOGFILE=/home/fire/www/timothyfletcher.com/logs/gunicorn.log | |
WORKERS=8 | |
BIND_ADDRESS=127.0.0.1:8000 |
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
### subdomain_test.rb | |
require 'integration_test_helper' | |
class SubdomainTest < ActionController::IntegrationTest | |
test "simple subdomain test" do | |
sub1 = "sub1" | |
sub2 = "sub2" | |
# this test passes using selenium | |
#Capybara.current_driver = :selenium |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>SoundCloud OAuth 2 User Agent Authentication Flow Demo</title> | |
<script type="text/javascript" charset="utf-8" src="javascript/jquery-1.4.2.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(function () { | |
var extractToken = function(hash) { |