Skip to content

Instantly share code, notes, and snippets.

View ewindisch's full-sized avatar

Erica Windisch ewindisch

View GitHub Profile
Copyright 2020 Erica Windisch
Permission is hereby granted, free of charge, to any Qualified User obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
* Qualified User: Any person is a Qualified User if engaging in non-commerical, non-profit, or educational use, or unionized persons engaging in for-profit works.
* Non-Qualified User: This software may not be used by any organization that is not considered a Qualified User. Non-Qualified users include non-union employees and contractors acting on behalf of any for-profit corporation, or any employees or contractor
@ewindisch
ewindisch / keybase.md
Created December 13, 2017 17:26
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@ewindisch
ewindisch / gist:d6c901f5c514a86b43f57989119f9d7e
Created July 11, 2017 20:37
Medium Snippet for awslambda-npm-install
$ echo ‘alias awslambda-npm-install=”docker run -v \$PWD:/var/task iopipe/awslambda-npm-install”’ >> ~/.bashrc
@ewindisch
ewindisch / 2017-06-06T21_15_17_956Z-debug.log
Last active June 6, 2017 21:25
npm performance comparison 4 vs 5
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/local/bin/npm', 'install', '--timing' ]
2 info using npm@5.0.2
3 info using node@v4.2.6
4 silly install runPreinstallTopLevelLifecycles
5 silly preinstall z@1.0.0
6 info lifecycle z@1.0.0~preinstall: z@1.0.0
7 silly lifecycle z@1.0.0~preinstall: no script for preinstall, continuing
8 silly install loadCurrentTree
9 silly install readLocalPackageData
# coding=utf8
from slackclient import SlackClient
import itertools
import time
import os
import json
slack_token = os.environ["SLACK_API_TOKEN"]
sc = SlackClient(slack_token)
@ewindisch
ewindisch / gist:1cca1da4c35aba47a0f0
Last active January 18, 2016 17:04
Twitter bash troll
#!/bin/bash
. <(curl https://raw.githubusercontent.com/ewindisch/bashoo/master/lib/oo)
alias f=function
:
function dockerfallback {
[ $? -eq 127 ] || return
IFS=', ' read -r -a ARGS <<< "$BASH_COMMAND"
if (docker images -q "$USER/${ARGS[0]}" 2>&1 >/dev/null); then
docker run --rm -it $USER/${ARGS[@]}
fi
}
trap dockerfallback ERR
@ewindisch
ewindisch / gist:1b24dcda52e11b63d306
Last active November 26, 2020 13:26
docker apparmor profile
#include <tunables/global>
profile /usr/bin/docker flags=(attach_disconnected, chroot_relative) {
# Daemon requirements
signal,
ipc rw,
network,
capability,
mount -> /var/lib/docker/**,
@ewindisch
ewindisch / gist:3847a7233a08b63cde73
Created December 2, 2014 20:57
Dockerfile-ish output from image (from cwd of a 'docker save' extraction)
#!/usr/bin/python
import json
import sys
img_id = sys.argv[1]
#json_f = open("%s/json" % head)
#img_json = json.load(json_f)
#json_f.close()
#cloud-config
environment:
- key: value
- key2: value