- Start a Sinatra server on port 4000
- GET / to that server triggers a
git pull
and mod_rails restart - Hit port 4000 locally after pushing
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
# Lo-fi client for the Facebook API. E.g.: | |
# | |
# fb = FacebookClient.new(:api_key => 'api-key', :secret => 'secret') | |
# fb.call 'users.getInfo', :session_key => 'session-key', :uids => 'user-id', :fields => 'birthday' | |
# | |
# by Scott Raymond <[email protected]> | |
# Public Domain. | |
# | |
class FacebookClient | |
def initialize(default_params={}) |
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
testapp |
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
class WebHook < ActiveRecord::Base | |
class << self | |
# Pushes a job onto a queue | |
def visit!(visit) | |
JobQueue.new(:events).push({ | |
:type => 'visit', | |
:visit_id => visit.id, | |
:user_id => visit.user_id, |
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
<ol class="latest_uploads"> | |
<%= render :partial => "composition", :collection => @playlist.listings.compositions %> | |
</ol> |
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
// | |
// StompService.h | |
// Objective-C Stomp Client | |
// | |
// Implements the Stomp Protocol v1.0, as described here: http://stomp.codehaus.org/Protocol | |
// Requires the AsyncSocket library: http://code.google.com/p/cocoaasyncsocket/ | |
// | |
// This class is in the public domain. | |
// by Scott Raymond <[email protected]>. | |
// |
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
# If cached file exists, serve it and stop processing | |
RewriteCond %{DOCUMENT_ROOT}/cache/%{HTTP_HOST}%{REQUEST_FILENAME} -f | |
RewriteRule ^(.*)$ /cache/%{HTTP_HOST}$1 [L] | |
# other redirection (imgs, js, css, ...) | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_URI} !.*/mephisto/.* | |
RewriteCond %{REQUEST_URI} !.*html | |
RewriteCond %{REQUEST_URI} !^/cache | |
RewriteCond %{DOCUMENT_ROOT}/cache/%{HTTP_HOST}/$1 -f |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> | |
<script type="text/javascript" src="file:///Users/acaldelas/Desktop/Wine Library Concept/Code/wine-lib-script.js"></script> | |
<link rel="stylesheet"type="text/css"href="wine-lib-styles.css"/> | |
<title>Wine Library</title> | |
</head> | |
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
Host project1.github.com | |
HostName github.com | |
User git # Probably not needed but just a note if you want to skip it | |
IdentityFile ~/.ssh/your_key_file | |
IdentitiesOnly yes # This is only if you want to avoid trying other identities which can speed things up a bit. | |
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/env ruby | |
## | |
# Originally from http://www.pragmaticautomation.com/cgi-bin/pragauto.cgi/Monitor/StakingOutFileChanges.rdoc | |
# Modified by Geoffrey Grosenbach http://peepcode.com | |
# | |
# Watches files and runs a command when any of them are modified. | |
# | |
# If one argment is given, will run that command and watch app, lib, test, spec. | |
# |