Skip to content

Instantly share code, notes, and snippets.

View asauber's full-sized avatar

Andrew Sauber asauber

View GitHub Profile
@asauber
asauber / fixaudio.sh
Last active December 17, 2019 11:00
Reset audio subsystem on macOS. Can fix some "no-output" problems.
alias fixaudio="sudo killall coreaudiod"
fixaudio
@asauber
asauber / metrics-server.yaml
Created December 11, 2019 15:20
Kubernetes Metric Server Manifest for Linode
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: system:aggregated-metrics-reader
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
@asauber
asauber / memory_error.txt
Created November 5, 2019 16:36
Python MemoryError
>>> bytes(int.from_bytes(bytes("buurrito".encode("ascii")), byteorder='little') ^ int.from_bytes(bytes("sushi".encode("ascii")), byteorder='little'))
python3(15111,0x1035955c0) malloc: can't allocate region
*** mach_vm_map(size=8031159600630075392) failed (error code=3)
python3(15111,0x1035955c0) malloc: *** set a breakpoint in malloc_error_break to debug
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
MemoryError
@asauber
asauber / docker_mac_free_space.sh
Last active May 21, 2020 16:42
Free up space used by Docker for Mac
#!/bin/bash
# Delete all unused image layers
docker system prune --all
# Delete all unused image layers non-interactive
docker system prune --all -f
# Run a container from Docker Inc. which cleans up the Virtual Machine
docker run --privileged --pid=host docker/desktop-reclaim-space
@asauber
asauber / csi-talk.md
Last active May 21, 2019 07:45
CSI 5-minute talk. Feel free to steal this. CC BY 4.0 License

CSI

The CSI, Container Storage Interface, is an RPC-based plugin API specification for container storage management.

The container orchestrator (Kubernetes, Mesos, Nomad, etc.) calls RPCs via gRPC, implemented by CSI plugin servers.

The plugin servers (also called drivers), implement three services: Identity, Controller, and Node.

The Identity service informs the container orchestrator about the plugin, its capabilities, and its status.

@asauber
asauber / calico.yaml
Created February 6, 2019 21:34
Calico 3.5 self-hosted manifest
# Calico Version v3.5.0
# https://docs.projectcalico.org/v3.5/releases#v3.5.0
# This manifest includes the following component versions:
# calico/node:v3.5.0
# calico/cni:v3.5.0
# This ConfigMap is used to configure a self-hosted Calico installation.
kind: ConfigMap
apiVersion: v1
metadata:
@asauber
asauber / cilium.yaml
Last active February 6, 2019 20:49
Cilium 1.3 manifest
---
apiVersion: v1
kind: ConfigMap
metadata:
name: cilium-config
namespace: kube-system
data:
# This etcd-config contains the etcd endpoints of your cluster. If you use
# TLS please make sure you follow the tutorial in https://cilium.link/etcd-config
etcd-config: |-
@asauber
asauber / results.txt
Created June 4, 2018 19:52
Manager e2e tests setup/teardown refactor test results (42 failures)
yarn run v1.3.2
$ ./node_modules/.bin/wdio ./e2e/config/wdio.conf.js
F
․․FFF․F․․F․F․․․․․․․․․․․․․․․․․․․․․․․․․․․F․․․․․․․․․FFFFF․․․․․F․․․․․․․․․․․․․․․․․․․․․․․․F․F․FF․․․FF․FFFFF․․F․FFFFFFFFF․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․FFFF․․․FFFF․․․
106 passing (1091.90s)
10 skipped
42 failing
@asauber
asauber / new_events_observable.js
Last active March 8, 2018 02:34 — forked from rjstires/new_events_observable.js
new_events_observable.js
import * as Rx from 'rxjs/Rx';
import { API_ROOT } from 'src/constants';
import Axios, { AxiosResponse } from 'axios';
import * as moment from 'moment';
function createDatestamp() {
return moment().utc().format('YYYY-MM-DDTHH:mm:ss');
}
let datestamp = createDatestamp();
@asauber
asauber / shing02mp3.sh
Last active December 16, 2016 20:16
grab shing02's mp3s
wget -r -A mp3,mp4,m4a,ogg,flac,wav,aiff,3ga,wma,ram,aac,pcm,midi,snd,mid,m4p,ra,ape,aa3,xa,ac3,fla,mp4b,m2a,mp2,au,mp1 --no-parent http://www.e22.com/shing02
IFS=$'\n'; for f in $(find www.e22.com -type f | egrep ".*\.(mp3|mp4|m4a|ogg|flac|wav|aiff|3ga|wma|ram|aac|pcm|midi|snd|mid|m4p|ra|ape|aa3|xa|ac3|fla|mp4b|m2a|mp2|au|mp1)$"); do mv "$f" .; done
rm -r www.e22.com