Skip to content

Instantly share code, notes, and snippets.

@gekart
gekart / mnlgxd.py
Last active March 2, 2023 06:27
KORG minilogue xd PROG file parser and pretty printer
# Use this file to parse the structure of your minilogue programs and libraries (sound banks)
# this makes it easy to understand and document a finished sound
# run "python mnlgxd.py test.mnlgxdprog" to print the sound in a program name test.mnlgxdprog
# or "python mnlgxd.py test.mnlgxdlib 1" to print the second sound in the bank named test.mnlgxdlib
import struct, sys, zipfile, fpdf
fileStructure = [
("MAGIC", "<4s"),
("PROGRAM NAME", "12s"),
import collections
import math
import os
import cv2
import numpy as np
import time
MAX_LINES = 4000
N_PINS = 36*8
MIN_LOOP = 20 # To avoid getting stuck in a loop
@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

@Gorcenski
Gorcenski / fizzbuzz.py
Last active May 23, 2022 23:55
The most obnoxious solution to FizzBuzz I can imagine.
import numpy as np
from functools import reduce
class Buzzer:
def __init__(self, **kwargs):
values = [v for k, v in kwargs.items()]
self.kwargs = kwargs
self.lcm = np.lcm.reduce(values)
self.eps = 1e-7
@ouelletv
ouelletv / socialSharePopups.js
Created August 1, 2018 13:58 — forked from josephabrahams/socialSharePopups.js
Facebook & Twitter Share Popup Windows
export default function() {
document.querySelectorAll('.js-share-facebook-link').forEach(function(el){
el.addEventListener('click', function(e){
var href = e.target.href;
e.preventDefault();
window.open(href, "Facebook", "toolbar=no,location=0,status=no,menubar=no,scrollbars=yes,width=600,height=400,resizable=1");
})
});
@andyrbell
andyrbell / scanner.sh
Last active April 5, 2024 09:01
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
@u1i
u1i / start_docker_registry.bash
Last active March 23, 2024 05:54 — forked from PieterScheffers/start_docker_registry.bash
Start docker registry with letsencrypt certificates and Basic Auth
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
@pauliusef
pauliusef / gist:c7bcc96481fb3113cc78ae1246901e6f
Created August 15, 2017 09:16
Select every second line in Sublime
Search for : (.*(\n|$)){2}
alt+R - to toggle regular expression search
alt+ENTER - to select all results
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 19, 2024 11:15 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@alexellis
alexellis / HackingOnLiveStreaming.md
Created June 1, 2017 12:48
HackingOnLiveStreaming

Additional notes

Original blog post - http://blog.alexellis.io/live-stream-with-docker/

How do I rebuild the image from scratch?

This will take several hours on a Raspberry Pi Zero - but less time on a Pi 2 or Pi 3. You can edit the Dockerfile for a Pi 2/3 and change RUN make to RUN make -j 4 to take advantage of the quad-core processor.

$ git clone https://github.com/alexellis/raspberrypi-youtube-streaming/