Skip to content

Instantly share code, notes, and snippets.

View CptLemming's full-sized avatar

Ashley Wilson CptLemming

View GitHub Profile
@asidko
asidko / gzip.js
Created April 20, 2022 14:00
Encode and decode base64 GZIP with pure JavaScript. Works in all modern browsers.
// Paste the following example to browser console
// Comppreses string to GZIP. Retruns a Promise with Base64 string
const compress = string => {
const blobToBase64 = blob => new Promise((resolve, _) => {
const reader = new FileReader();
reader.onloadend = () => resolve(reader.result.split(',')[1]);
reader.readAsDataURL(blob);
});
@muratgozel
muratgozel / install_pillow.sh
Created November 28, 2018 15:39
install pillow (python imaging library) on ubuntu 18.04 (bionic)
#!/bin/bash
apt update
apt install python3-pip -y
apt install libjpeg8-dev zlib1g-dev libtiff-dev libfreetype6 libfreetype6-dev libwebp-dev libopenjp2-7-dev libopenjp2-7-dev -y
pip3 install pillow --global-option="build_ext" --global-option="--enable-zlib" --global-option="--enable-jpeg" --global-option="--enable-tiff" --global-option="--enable-freetype" --global-option="--enable-webp" --global-option="--enable-webpmux" --global-option="--enable-jpeg2000"
import 'rxjs/add/observable/fromEvent';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/filter';
import 'rxjs/add/operator/switchMap'
import 'rxjs/add/operator/share';
import 'rxjs/add/operator/takeUntil';
export class CanvasInteractionManager {
private destroy$ = new Subject<void>();
@njh
njh / aes67_wishlist.md
Last active December 26, 2025 21:23
AES67 Open Source Software Wishlist

AES67 (an open standard for high quality audio over IP) is becoming mainstream in the world of broadcast and professional audio industries, however there is a very limited amount of open source software available to interoperate with it. As a result we are often just replacing XLRs with Ethernet, without taking advantage of the possibilites the software give. While Virtual Soundcards enable some of this, native network implementations would allow greater flexibility.

This is my wishlist of things that would help change that. Hopefully one day it can be turned into a AES67 Awesome List.

As open source has resulted in very rapid evolution of the web, I believe the same is possible for professional/broadcast audio.

It is possible that some of this already exists and I just havn't found it yet. Please add a comment below if you know of something!

kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@zalmoxisus
zalmoxisus / configureStore.js
Created August 2, 2016 14:52
Require modules from all files in subdirectories as a nested object
function requireAll(requireContext) {
return requireContext.keys().reduce((previous, current) => {
const name = current.substring(current.lastIndexOf('/') + 1, current.lastIndexOf('.'));
previous[name] = requireContext(current);
return previous;
}, {});
}
const actionCreators = requireAll(require.context('../actions', true, /^\.\/.*\.js$/));
import six
import itertools
from attrdict import AttrDict
import graphene
from graphene.core.classtypes.objecttype import ObjectTypeOptions
from graphene.core.types import ArgumentsGroup
from graphene.core.types.definitions import NonNull
from graphene.core.classtypes.mutation import Mutation, MutationMeta
@subfuzion
subfuzion / curl.md
Last active December 24, 2025 13:07
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@dimasch
dimasch / redis-clear
Last active September 25, 2025 01:56
Clear a redis cache in Docker
docker exec -it container-name redis-cli FLUSHALL