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
window.applicationCache.addEventListener('updateready', function(e) { | |
if (window.applicationCache.status == window.applicationCache.UPDATEREADY) { | |
// Browser downloaded a new app cache. | |
// Swap it in and reload the page to get the new hotness. | |
window.applicationCache.swapCache(); | |
if (confirm('A new version of this site is available. Load it?')) { | |
window.location.reload(); | |
} | |
} else { | |
// Manifest didn't changed. Nothing new to server. |
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
# # Instapaper API Class | |
# | |
# Instapaper xAuth API for client side JS. Depends on cross-domain requests. | |
# | |
# Reference: <http://www.instapaper.com/api/full> | |
# | |
# xAuth documentation from Twitter: <https://dev.twitter.com/docs/oauth/xauth> | |
# | |
# With help from <https://gist.github.com/447636> | |
# |
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
require 'yaml' | |
config_file = '_config.yml' | |
config = YAML.load_file(config_file) | |
class JekyllOutput | |
def self.compile | |
Process.spawn "jekyll --no-server --no-auto" | |
end |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>MarkdownEditing</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Form Test</title> | |
<script src="http://code.jquery.com/jquery-1.8.1.min.js"></script> | |
<script> | |
jQuery(function($) { | |
$('form.original').live('submit', function(ev) { |
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
# ~/.config/fish/config.fish | |
. ~/.config/fish/fish_prompt.fish | |
set fish_greeting '' # turn off greeting | |
function fish_title;end | |
alias vi 'vim' |
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
#! /bin/csh | |
## | |
# Backup Postgres and Avatars to S3 | |
# | |
# Requires: | |
# - postgres with pg_dump | |
# - xz to compress | |
# - openssl to encrypt | |
# - pv for nice output (two progress bars, for sql dump and compress) |
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
/var/log/nginx-access.log 644 7 1024 * JC /var/run/nginx.pid 30 | |
/var/log/nginx-error.log 644 7 1024 * JC /var/run/nginx.pid 30 | |
/home/app/episodefever/shared/log/unicorn.stdout.log app:app 666 7 1024 * JC | |
/home/app/episodefever/shared/log/unicorn.stderr.log app:app 666 7 1024 * JC | |
/home/app/episodefever/shared/log/newrelic_agent.log app:app 666 7 1024 * JC | |
/home/app/episodefever/shared/log/production.log app:app 666 7 1024 * JC /usr/home/app/episodefever/shared/pids/unicorn.pid 30 | |
/home/app/episodefever/shared/log/resque-pool.stdout.log app:app 666 7 1024 * JC /usr/home/app/episodefever/shared/pids/resque-pool.pid 30 | |
/home/app/episodefever/shared/log/resque-pool.stderr.log 666 7 1024 * JC /usr/home/app/episodefever/shared/pids/resque-scheduler.pid 30 |
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
. ~/.config/fish/fish_prompt.fish | |
set fish_greeting '' # turn off greeting | |
alias vi 'vim' | |
alias o 'open' | |
alias wtf 'brew home' | |
alias pg 'ps aux | grep' | |
alias fuckthefinder 'sudo killall -KILL appleeventsd' | |
alias fuckdns 'sudo killall -HUP mDNSResponder' |
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
/** | |
* scrollTop Module | |
* | |
* Just add `totop` as class or attribute to some element. | |
* | |
* This used to be plain jQuery, but we are cool now. Sadly, it | |
* still requires jQuery for the animation. | |
* | |
* This even works as a Facebook page, thanks to | |
* http://stackoverflow.com/a/8130267/1254484 |