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
<?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 ") |
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
<!-- | |
====================================================================== | |
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 | |
---------------------------------------------------------------------- |
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
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) |
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 sys | |
import fcntl | |
LOCK_EX = fcntl.LOCK_EX | |
LOCK_SH = fcntl.LOCK_SH | |
LOCK_NB = fcntl.LOCK_NB | |
class Flock(object): |
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 python | |
import os | |
import sys | |
import fcntl | |
import termios | |
import struct | |
import urllib2 | |
import json | |
GITIGNORE_URL = "https://api.github.com/gitignore/templates" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>EnvironmentVariables</key> | |
<dict> | |
<key>PATH</key> | |
<string>/usr/local/Cellar/ruby/1.9.3-p125/bin:/usr/local/share/npm/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/share/npm/bin:/usr/local/sbin:/usr/X11/bin:/Users/gitlab/.rvm/bin</string> | |
</dict> | |
<key>KeepAlive</key> |
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
<?php | |
class Redis { | |
const CRLF = "\r\n"; | |
private $connection; | |
/** | |
* Create a new instance of the class. |
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
<?php | |
/** | |
* A simple PHP class to interact with the Sifter API. | |
*/ | |
class Sifter | |
{ | |
/** | |
* Sifter account hostname (example.sifterapp.com) |
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 | |
CHECKSUM=$1 | |
FILE=$2 | |
if [[ -z "$CHECKSUM" ]]; then | |
echo "Usage: $0 md5 file" | |
exit 1 | |
elif [[ -z "$FILE" ]]; then | |
echo "Usage: $0 md5 file" |
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
"Don't think about using arrow keys in vim | |
noremap <Up> :q!<Enter> | |
noremap! <Up> <Esc>:q!<Enter> | |
noremap <Down> :q!<Enter> | |
noremap! <Down> <Esc>:q!<Enter> | |
noremap <Left> :q!<Enter> | |
noremap! <Left> |