Skip to content

Instantly share code, notes, and snippets.

@jdelibas
jdelibas / merge.js
Last active March 7, 2018 16:47
merge object array via discriminator - append only
function merge(dest, src, discriminator) {
if (!discriminator) {
return [...dest, ...src];
}
const result = [...dest];
src.forEach((s) => {
const match = dest.find(d => d[discriminator] === s[discriminator]);
if (match) {
const oldVal = JSON.stringify(match);
const newVal = JSON.stringify(s);
@jdelibas
jdelibas / interactive rebase.gif
Last active December 6, 2017 13:08
Interactive rebase
interactive rebase.gif
@jdelibas
jdelibas / remove.sh
Created August 17, 2017 09:49
remove node_modules recursive
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
@jdelibas
jdelibas / README.md
Last active June 7, 2017 09:24
AWS KMS and S3 secret storage

AWS KMS and S3 secret storage

Usage

const Secrets = require('./Secrets')
const secrets = new Secrets({
  accessKeyId: 'some aws access key id',
 secretAccessKey: 'some aws secret access key'
@jdelibas
jdelibas / keybase.md
Created May 22, 2017 18:16
keybase.md

Keybase proof

I hereby claim:

  • I am jdelibas on github.
  • I am jdelibas (https://keybase.io/jdelibas) on keybase.
  • I have a public key ASB7b63EMgVRhfw4t-AGHFNZXa4_0Wurbrb7mimimidvcQo

To claim this, I am signing this object:

@jdelibas
jdelibas / funFn.js
Created May 3, 2017 07:46
async error test
async function runFn (q) {
try {
if (q === 1) {
throw q
}
return q
} catch (e) {
throw e
}
}
@jdelibas
jdelibas / test gist
Created March 9, 2017 09:49
test gist
some test gist
@jdelibas
jdelibas / gcloud.sh
Created November 17, 2016 11:54
kubernetes on gcp
https://cloud.google.com/sdk/downloads#interactive
$ curl https://sdk.cloud.google.com | bash
$ exec -l $SHELL
$ gcloud init
$ gcloud components install kubectl
Installing google-cloud-sdk to $HOME directory
@jdelibas
jdelibas / openconnect.md
Created September 21, 2016 09:38 — forked from moklett/openconnect.md
OpenConnect VPN on Mac OS X

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect

@jdelibas
jdelibas / index.html
Last active July 26, 2016 11:12
mcloud-users-change-profile
<div ng-app="mcloud-pen"
ng-controller="mainController"
class="form-mini-container"
>
<div class="row">
<div class="col-xs-2 col-md-4">
</div>