Deprecated! Use LiveReload instead.
via xrefresh#17
ruby ws_dir_watcher.rb ~/my_site
- Open chrome://extensions/
- "Developer mode", then press "Load unpacked extension" button
require 'digest/md5' | |
def gfm(text) | |
# Extract pre blocks | |
extractions = {} | |
text.gsub!(%r{<pre>.*?</pre>}m) do |match| | |
md5 = Digest::MD5.hexdigest(match) | |
extractions[md5] = match | |
"{gfm-extraction-#{md5}}" | |
end |
''' | |
This python script listens for distributed notifications from iTunes of new songs playing, | |
works alot better then constantly polling. | |
''' | |
import Foundation | |
from AppKit import * | |
from PyObjCTools import AppHelper | |
class GetSongs(NSObject): | |
def getMySongs_(self, song): |
via xrefresh#17
ruby ws_dir_watcher.rb ~/my_site
// geo-location shim | |
// currentely only serves lat/long | |
// depends on jQuery | |
// doublecheck the ClientLocation results because it may returning null results | |
;(function(geolocation){ | |
if (geolocation) return; |
# Small utility which uses the homepage and nokogori to get a description from the formula's homepage. | |
# | |
# As written in the homebrew wiki: | |
# > Homebrew doesn’t have a description field because the homepage is always up to date, | |
# > and Homebrew is not. Thus it’s less maintenance for us. To satisfy the description | |
# > we’re going to invent a new packaging microformat and persuade everyone to publish | |
# > it on their homepage. | |
# | |
# Too bad no packaging microformat has yet been invented, but brew-more just first looks for a | |
# `<meta name="description">` tag, then for an `a#project_summary_link` tag (which is used in |
#!/usr/bin/env bash | |
# memusg -- Measure memory usage of processes | |
# Usage: memusg COMMAND [ARGS]... | |
# | |
# Author: Jaeho Shin <[email protected]> | |
# Created: 2010-08-16 | |
############################################################################ | |
# Copyright 2010 Jaeho Shin. # | |
# # | |
# Licensed under the Apache License, Version 2.0 (the "License"); # |
// ==UserScript== | |
// @name UTM param stripper | |
// @author Paul Irish | |
// @namespace http://github.com/paulirish | |
// @version 1.2 | |
// @description Drop the UTM params from a URL when the page loads. | |
// @extra Cuz you know they're all ugly n shit. | |
// @include http*://* | |
// ==/UserScript== |
application: you-app-name-here | |
version: 1 | |
runtime: python | |
api_version: 1 | |
default_expiration: "30d" | |
handlers: | |
- url: /(.*\.(appcache|manifest)) | |
mime_type: text/cache-manifest |
// Basic XMPP bot example for HipChat using node.js | |
// To use: | |
// 1. Set config variables | |
// 2. Run `node hipchat_bot.js` | |
// 3. Send a message like "!weather 94085" in the room with the bot | |
var request = require('request'); // github.com/mikeal/request | |
var sys = require('sys'); | |
var util = require('util'); |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |