Skip to content

Instantly share code, notes, and snippets.

View leoj3n's full-sized avatar
:octocat:
Edit status

Joel Kuzmarski leoj3n

:octocat:
Edit status
  • Drinking coffee somewhere.
View GitHub Profile
@jwage
jwage / SplClassLoader.php
Last active April 9, 2024 21:04
Add MIT license.
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// Puncture a closure, absolute madness
Function.prototype.puncture = function(){
var wormhole = function(__cmd__){
return eval(__cmd__);
};
var source = ('' + this).match(/function.+?\{([\s\S]*)\}/)[1];
var fn = new Function('this.wormhole=' + wormhole + '\n' + source);
@lwe
lwe / brew-more.rb
Created July 14, 2010 08:53
Try to scrape formula information from @formula.homepage.
# 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
@burtonian
burtonian / ListenLog.js
Created October 15, 2011 00:01
Emancipay ListenLog Prototype
ruleset a35x110 {
meta {
name "VRM EmanciPay"
description <<
VRM EmanciPay prototype with ListenLog
Twilio # Your Twilio number
>>
author "Craig Burton with a lot of help from Ed Orcutt"
logging off
key twitter {
@buhrmi
buhrmi / gist:1344659
Created November 7, 2011 10:51
Sublime Text 2 Git Annotation Colors
<dict>
<key>name</key>
<string>Git Modified Line</string>
<key>scope</key>
<string>git.changes.x</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#272852</string>
</dict>
@joncave
joncave / endpoints.php
Created June 7, 2012 19:41
WP_Rewrite endpoints demo
<?php
/*
Plugin Name: WP_Rewrite endpoints demo
Description: A plugin giving example usage of the WP_Rewrite endpoint API
Plugin URI: http://make.wordpress.org/plugins/2012/06/07/rewrite-endpoints-api/
Author: Jon Cave
Author URI: http://joncave.co.uk/
*/
function makeplugins_endpoints_add_endpoint() {
@AndreasMadsen
AndreasMadsen / WhatIHaveDone.md
Last active February 13, 2022 16:15
Playing with smartos
@danro
danro / Custom.css
Created September 16, 2012 17:32
Improved webkit inspector toolbar
#-webkit-web-inspector #toolbar {
background: #cdcdcd !important;
height: 36px !important;
}
#-webkit-web-inspector #main {
top: 36px !important;
}
#-webkit-web-inspector .toolbar-item.elements:hover:after {
content: "elements";
z-index: 9999;
@ccampbell
ccampbell / mousetrap-pause.js
Created September 19, 2012 03:30
Extends mousetrap.js to add pause/unpause support. Just include this js after mousetrap.
/**
* adds a pause and unpause method to Mousetrap
* this allows you to enable or disable keyboard shortcuts
* without having to reset Mousetrap and rebind everything
*/
Mousetrap = (function(Mousetrap) {
var self = Mousetrap,
_original_stop_callback = self.stopCallback,
enabled = true;
@weskoop
weskoop / gist:3796570
Created September 27, 2012 21:27
My current Linode Symlinked WP Core, APC/Batcache Setup
Site Root /
content/
advanced-cache.php
index.php
mu-plugins/ -> /shared/wp/mu-plugins
object-cache.php
plugins/
themes/
uploads/
index.php