Skip to content

Instantly share code, notes, and snippets.

@elrac
elrac / com.docker.boot2docker.plist
Last active August 29, 2015 14:25 — forked from johnantoni/com.docker.boot2docker.plist
run boot2docker on system startup - Mac OSX - Yosemite
<?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>Label</key>
<string>com.docker.boot2docker</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
@elrac
elrac / async.js
Last active August 29, 2015 14:26
Async using generators.
function async(f) {
var func = f;
return function () {
return async_(func, arguments);
}
}
function async_(g, args) {
var it = g.apply(this, args);
var ret;
@elrac
elrac / consolePrint_condensed.js
Last active August 29, 2015 14:26
A js script for printing console logs on the page as well as in the console.
(function () {
// add a div with id='consoleLog' to the document and
// it will have the console log in it. If that div doesn't
// exist then this code does nothing.
var style = document.createElement('style');
style.setAttribute("type", "text/css");
style.textContent = ".info{background-color:lightGreen;}.warn{background-color:yellow}.error{background-color:lightPink}#consoleLog{border:medium double;}";
(function(e){if("function"==typeof bootstrap)bootstrap("nedb",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeNedb=e}else"undefined"!=typeof window?window.Nedb=e():global.Nedb=e()})(function(){var define,ses,bootstrap,module,exports;
return (function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s<n.length;s++)i(n[s]);return i})({1:[function(require,module,exports){
var process=require("__browserify_process");if (!process.EventEmitter) process.EventEmitter = function () {};
var EventEmitter = exports.EventEmitter = process.EventEmitter;
var isArray = typeof Array.isArray === 'functio
CREATE OR REPLACE FUNCTION partition_function( )
RETURNS trigger AS
$BODY$
DECLARE
_tablename text;
_dataval text;
_schema text;
_colName text;
BEGIN