View lock.py
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
import sys | |
import fcntl | |
LOCK_EX = fcntl.LOCK_EX | |
LOCK_SH = fcntl.LOCK_SH | |
LOCK_NB = fcntl.LOCK_NB | |
class Flock(object): |
View Guardfile
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 'jekyll' | |
module ::Guard | |
class Jekyll < Guard | |
def start | |
puts "Starting Jekyll on port #{port}" | |
options = ::Jekyll.configuration({:serving => true, :watch => true, :port => port}) | |
p = ::Process.fork do | |
::Jekyll::Commands::Build.process(options) | |
::Jekyll::Commands::Serve.process(options) |
View FreshCutDark.tmTheme
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
<!-- | |
====================================================================== | |
FreshCut Dark - Based on FreshCut by Dayle Rees | |
====================================================================== | |
A Sublime Text 2 / Textmate theme. | |
Copyright (c) 2012 Dayle Rees. | |
Released under the MIT License <http://opensource.org/licenses/MIT> | |
---------------------------------------------------------------------- | |
Find more themes at : https://github.com/daylerees/colour-schemes | |
---------------------------------------------------------------------- |
View flickr.php
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
<?php | |
$id = '30065870@N08'; // Find your Flickr ID at http://idgettr.com | |
$url = 'http://api.flickr.com/services/feeds/photos_public.gne?id='.$id.'&format=json'; | |
$ch = curl_init($url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); | |
$response = curl_exec($ch); | |
curl_close($ch); | |
// Remove jsonp callback (jsonFlickrFeed) and escaped characters (except ") |
View nginx.conf.erb
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
<%# modules/common/templates/nginx.conf.erb %> | |
# Example template for PHP-FPM based projects | |
# | |
# The template which nginx uses within a boxen::project can be overridden | |
# to a specific template such as this one. | |
# | |
# You will likely need to change both the root and SCRIPT_FILENAME parameters below | |
# to match your setup | |
# | |
server { |
View FormCollectionView.js
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
/** | |
* @fileOverview Form collection handler | |
* | |
* @author Matthew Loberg | |
*/ | |
define(function(require, module, exports) { | |
'use strict'; | |
var $ = require('jquery'); |
View contact.php
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
<?php | |
// get a recaptcha api key at http://www.google.com/recaptcha/whyrecaptcha | |
require_once("path/to/recaptchalib.php"); | |
$publickey = ""; | |
$privatekey = ""; | |
// see if the form has been submitted | |
if($_POST['submit']){ | |
// error checking | |
$errors = ''; |
View postmark.php
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
<?php | |
/** | |
* Send emails with Postmark (http://postmarkapp.com) | |
* | |
* Author: Matthew Loberg | |
* Author Twitter: @mloberg | |
* Author Website: http://mloberg.com | |
*/ | |
View Popcorn.SourceCode.js
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
/** | |
* Popcorn SourceCode Plugin v0.1 | |
* http://mattwritescode.com/2011/11/popcorn-source-code-plugin/ | |
* | |
* Copyright 2011 Matthew Loberg (http://mloberg.com) | |
* Licensed under the MIT license | |
* | |
* Description: | |
* Add source code pre/code element to the page. | |
* If Google Code Prettify <http://code.google.com/p/google-code-prettify/> |
View aacinfo.rb
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
## | |
# Name: AACInfo | |
# Author: Matthew Loberg | |
# Author URL: http://twitter.com/mloberg | |
# Description: | |
# I couldn't get MP4Info to read the tags of my iTunes music files, so I created this little class. | |
# It uses faad to get the tag info, so make sure it's installed (brew install faad2) | |
require 'iconv' | |
class AACInfo |
OlderNewer