Skip to content

Instantly share code, notes, and snippets.

🏳️‍🌈
putting the T in LGBT

Derick Bailey derickbailey

Block or report user

Report or block derickbailey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am derickbailey on github.
  • I am derickbailey (https://keybase.io/derickbailey) on keybase.
  • I have a public key ASDitPYFNXZGpnctUagzZEvUbd8RRE1j_ct83ytj180HbAo

To claim this, I am signing this object:

@derickbailey
derickbailey / 1.js
Last active Aug 22, 2016
undefined is not a function
View 1.js
if (VENDOR && _.isFunction(VENDOR.f)) {
VENDOR.f();
}
@derickbailey
derickbailey / _instructions.md
Last active Aug 7, 2016
simplify your "docker exec" with a "dexec" shell script
View _instructions.md

to use this script,

copy it to /usr/local/bin/

then in a folder where you are working on an app hosted in docker, add the name of your docker container to a .dockername file

echo my-container-name >> .dockername

now you can

@derickbailey
derickbailey / 1.js
Last active Jun 23, 2016
bind vs curry
View 1.js
function add(a, b){
return a + b;
}
var add1 = add.bind(undefined, 1);
add1(2) // => 3
@derickbailey
derickbailey / 1.js
Created May 15, 2016
custom error with clean stack trace
View 1.js
function createError(msg, status){
var err = new Error(msg);
err.status = status;
// uncomment this next line to get a clean stack trace in node.js
// Error.captureStackTrace(err, createError);
return err;
}
var err = createError("test", 500);
@derickbailey
derickbailey / totoro.md
Last active Mar 11, 2016
Baby Totoro crochet pattern
View totoro.md
@derickbailey
derickbailey / 1_example.js
Last active Jan 21, 2016
node-oracledb cursor handling
View 1_example.js
// set up your oracle stuff ...
function runIt(cb){
// connection and other setup here
var bindvars = {
o_cursor: {
type: oracledb.CURSOR,
@derickbailey
derickbailey / 1_exampleUse.js
Created Dec 1, 2015
backbone / marionette / bootstrap: modal dialog example for "Confirm Delete" dialog
View 1_exampleUse.js
import ConfirmDelete from "./confirmDelete"
import ConfirmDeleteViewfrom "./confirmDeleteView"
var confirmView = new ConfirmDeleteView({
model: myModel
});
ConfirmDelete.confirm(confirmView, () => {
// delete was confirmed... do something, here
});
@derickbailey
derickbailey / 1.js
Last active Oct 19, 2015
cleaning up w/ nanit
View 1.js
var mongoose = require("mongoose");
var wascally = require("wascally");
var AWS = require("aws-sdk");
var some = require("some-thing");
var other = require("other-thing");
var more = require("more-things");
mongoose.connect(connStr, function(err)(
if (err) { throw err; }
@derickbailey
derickbailey / .gitconfig
Created Oct 6, 2015
replacing git:// with https:// in git commands
View .gitconfig
[url "https://github.com/"]
insteadOf = git://github.com/
You can’t perform that action at this time.