Skip to content

Instantly share code, notes, and snippets.

View ewindisch's full-sized avatar

Erica Windisch ewindisch

View GitHub Profile
@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/**,
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
:
On Thu, Dec 26, 2013 at 7:27 PM, iTunes Store <iTunesStoreSupport@apple.com> wrote:
Dear XXXX,
Hello again!, Thank you for your response, it is much appreciated.
I feel that my emails have not been read.
Your responses do not relate to my problem.
Please read this email.
@ewindisch
ewindisch / git-sum-string-over-time.py
Created July 19, 2013 14:53
Get the total number of results for a string match over time from a git repository. The example here uses 'def test_' to fetch time series data for the addition of unit tests to a code base.
#!/usr/bin/env python2.7
import itertools
import subprocess
import time
def soi(s):
#if isinstance(s, int):
# return s
return int(s.split(':')[-1].rstrip())
@ewindisch
ewindisch / obs-python-sum-iterator.py
Last active December 16, 2015 02:39
Python iterator... without iterators
#!/usr/bin/env python
import operator as yx
from functools import partial as S5
mul=getattr
mul=S5(reduce, (lambda xy:(lambda x,y:x(yx,y))(eval(xy),xy))('mul'))
def S(*_):
"""
Cumulative sum