Skip to content

Instantly share code, notes, and snippets.

View hpoom's full-sized avatar

Simon Wood hpoom

View GitHub Profile
@hpoom
hpoom / orchestra-temp-upload.php
Created February 1, 2012 15:41 — forked from kevinholler/orchestra-temp-upload.php
WordPress plugin for Orchestra.io to set the upload path to sys_get_temp_dir().
<?php
/*
Plugin Name: Orchestra.io Upload to Temp
Plugin URI:
Description: Sets the upload path to sys_get_temp_dir(), allowing uploads to be stored temporarily, presumably before being moved elsewhere (like Amazon S3 via the tantan-s3 plugin).
Version: 0.1
Author: Dylan Kuhn
Author URI: http://www.cyberhobo.net/
Minimum WordPress Version Required: 3.0
License: GPL2+
@hpoom
hpoom / gist:4056329
Created November 11, 2012 21:29 — forked from anonymous/gist:4055232
How to set a property in express scoped to each request
// When setting up your application define what you need using
// http://expressjs.com/api.html#app.use
// In this case we are creating an instance of 'Bar'
app.use(function( req, res, next ) {
res.locals.foo = 1;
next();
});
// Later on in your routes you have access to the instance of 'Bar'
// Some test JS to prove this comment gets stripped but the profanity does not.
var testFunc = function() {
console.log( 'f**k' );
}
testFunc();
/*! grunt-playground 2013-11-27 */
var testFunc=function(){console.log("f**k")};testFunc();
// This comment should vanish
@color: #4D926F;
#rudeWord {
color: @color;
}
h2 {
color: @color;
}
#rudeWord {
color: #4d926f;
}
h2 {
color: #4d926f;
}
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! &lt;%= pkg.name %&gt; &lt;%= grunt.template.today("yyyy-mm-dd") %&gt; */\n'
},
build: {
Running "lint_pattern:files" (lint_pattern) task
Warning: Profanity is not allowed.
less/source.less
Use --force to continue.
Aborted due to warnings.
Running "lint_pattern:files" (lint_pattern) task
Warning: Profanity is not allowed.
src/grunt-playground.js
Use --force to continue.
Aborted due to warnings.

Keybase proof

I hereby claim:

  • I am hpoom on github.
  • I am hpoom (https://keybase.io/hpoom) on keybase.
  • I have a public key whose fingerprint is DC5E 496C 4888 FF9B B43F 24BA 3A6C 559D 2E1A 648C

To claim this, I am signing this object: