Skip to content

Instantly share code, notes, and snippets.

@Nathan-Wall
Nathan-Wall / example.sql
Last active February 15, 2017 02:06
Combine two SQL columns into one, selecting distinct results
CREATE TABLE _test_1 (
a varchar(64));
CREATE TABLE _test_2 (
b varchar(64));
INSERT INTO _test_1 (a)
VALUES ('john'),
('sue'),
('bob'),
<?php
$elements = array();
////
// An array of 10,000 elements with random string values
////
for($i = 0; $i < 10000; $i++) {
$elements[] = (string)rand(10000000, 99999999);
}
@Nathan-Wall
Nathan-Wall / FN.js
Created November 18, 2012 17:56
An implementation of call, apply, and bind without the use of call, apply, or bind. Additionally includes a lazyBind implementation.
var FN = (function(Object, String) {
'use strict';
var undefined,
create = Object.create,
keys = Object.keys,
getOwnPropertyNames = Object.getOwnPropertyNames,
getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor,