- 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 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
(defvar user-temporary-file-directory | |
(concat temporary-file-directory user-login-name "/")) | |
(make-directory user-temporary-file-directory t) | |
(setq backup-by-copying t) | |
(setq backup-directory-alist | |
`(("." . ,user-temporary-file-directory) | |
(,tramp-file-name-regexp nil))) | |
(setq auto-save-list-file-prefix | |
(concat user-temporary-file-directory ".auto-saves-")) |
This file contains 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
du -sk . * | perl -e '$sum=<>; | |
while (<>) { | |
($size, $inode)=split; | |
chop $size; | |
printf("%30s | %5d | %2.2f%%\n",$inode,$size,$size/$sum*1000); | |
}' | sort -rn -k 3 | head |
This file contains 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
;;; open-file-in-github.el --- Open current buffer's file on GitHub | |
;; Copyright (C) 2009 Michael Ivey & Daniel Jackoway <gweezlebur.com> | |
;; Version: 0.1.0 | |
;; Keywords: github git open highlight | |
;; Created: 19 Aug 2009 | |
;; Authors: | |
;; Michael Ivey | |
;; Daniel Jackoway |
This file contains 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
.mouse, #preview{ | |
position: absolute; | |
background-repeat: no-repeat; | |
height: 22px; | |
min-width: 15px; | |
z-index: 100; | |
} | |
.mouse{ | |
background-image: url('../images/cursor.png'); |
This file contains 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
old code: | |
code = <<-code | |
def #{ name }! | |
initializer = ObjectSpace._id2ref #{ initializer_id } | |
self.#{ name } = initializer.call(self) | |
@#{ name } | |
end | |
code | |
compile[code] |
This file contains 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 TicketsController < ApplicationController | |
def show | |
tickets = params[:tickets].split(",") | |
ticket_data = tickets.map do |ticket| | |
parallel { Faraday.get("http://tickets.local/#{ticket}") } | |
end | |
render json: { tickets: ticket_data.map(&:result) } | |
end |
http://www.nextbus.com/xmlFeedDocs/NextBusXMLFeed.pdf
http://webservices.nextbus.com/service/publicXMLFeed?command=agencyList
Obtain a list of available transit agencies.