Skip to content

Instantly share code, notes, and snippets.

View mxriverlynn's full-sized avatar
🏳️‍🌈
coding while trans

River Lynn Bailey mxriverlynn

🏳️‍🌈
coding while trans
View GitHub Profile
@mxriverlynn
mxriverlynn / .gituprc
Last active July 20, 2020 14:20
gitup's configuration
# Gitup: Git Update Dance Configuration
# -------------------------------------
# configuration for gitup can be set as a default for the current user
# by adding a ~/.gituprc file with settings
#
# current project or local directory settings can be added in ./.gituprc
#
# the .gituprc file is a valid shell script, loaded every time gitup is
# run. this means you can add logic, functions, and other calls to the
# .gituprc file and it will be executed at runtime
@mxriverlynn
mxriverlynn / gitup.sh
Last active July 20, 2020 20:08
A small script to automate the "git update dance" for Rails projects
function gitup {
# set defaults for all options
GITUP_MERGE_COMMAND=rebase
GITUP_BRANCH_NAME=development
GITUP_REMOTE_NAME=origin
GITUP_SKIP_UPDATE=0
GITUP_SKIP_MIGRATIONS=0
# load user level settings as overrides
local user_config_file="$(echo ~/.gituprc)"

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:

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

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

@mxriverlynn
mxriverlynn / 1.js
Last active June 23, 2016 16:18
bind vs curry
function add(a, b){
return a + b;
}
var add1 = add.bind(undefined, 1);
add1(2) // => 3
@mxriverlynn
mxriverlynn / 1.js
Created May 15, 2016 22:00
custom error with clean stack trace
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);
@mxriverlynn
mxriverlynn / totoro.md
Last active March 11, 2016 00:32
Baby Totoro crochet pattern
@mxriverlynn
mxriverlynn / 1_example.js
Last active April 16, 2020 05:12
node-oracledb cursor handling
// set up your oracle stuff ...
function runIt(cb){
// connection and other setup here
var bindvars = {
o_cursor: {
type: oracledb.CURSOR,
@mxriverlynn
mxriverlynn / 1_exampleUse.js
Created December 1, 2015 16:32
backbone / marionette / bootstrap: modal dialog example for "Confirm Delete" dialog
import ConfirmDelete from "./confirmDelete"
import ConfirmDeleteViewfrom "./confirmDeleteView"
var confirmView = new ConfirmDeleteView({
model: myModel
});
ConfirmDelete.confirm(confirmView, () => {
// delete was confirmed... do something, here
});