Skip to content

Instantly share code, notes, and snippets.

@johndoe46
johndoe46 / wavfile.py
Created March 26, 2019 21:22 — forked from josephernest/wavfile.py
wavfile.py (enhanced)
# wavfile.py (Enhanced)
# Date: 20190213_2328 Joseph Ernest
#
# URL: https://gist.github.com/josephernest/3f22c5ed5dabf1815f16efa8fa53d476
# Source: scipy/io/wavfile.py
#
# Added:
# * read: also returns bitrate, cue markers + cue marker labels (sorted), loops, pitch
# See https://web.archive.org/web/20141226210234/http://www.sonicspot.com/guide/wavefiles.html#labl
# * read: 24 bit & 32 bit IEEE files support (inspired from wavio_weckesser.py from Warren Weckesser)
@johndoe46
johndoe46 / wav-riff-reader.py
Created March 26, 2019 21:05 — forked from JonathanThorpe/wav-riff-reader.py
Python WAV File RIFF Header Reader
import struct
import io
class WAVFile:
def __init__(self, filename):
self.filename = filename
def read(self):
with io.open(self.filename, 'rb') as fh:
@johndoe46
johndoe46 / MIDI controller.ino
Created September 27, 2017 13:13 — forked from mzierer/MIDI controller.ino
Some code for a custom MIDI controller I built
//This code is to be used with a MIDI controller I recently built.
//Pictures and info about the project: http://imgur.com/a/ngEN2
//It's a Teensy LC arduino style microcontroller working inside an old guitar distortion effect foot pedal.
//The controller features four main potentiometers to send midi CC values in two different banks that can be changed by an spdt switch
//There's also one button to send a midi note and another potentiometer on the right side to send midi CC signals
//The code and project are heavily inspired by this awesome video tutorial series: https://youtu.be/JONIZdLZAVM (in German)
//The LED pulse effect I found somewhere on the internet
@johndoe46
johndoe46 / 0readme.md
Created July 5, 2017 14:05 — forked from mdamien/0readme.md
404 link detector with scrapy

List all the broken links on your website

Requirements:

python3 and scrapy (pip install scrapy)

Usage

  • scrapy runspider -o items.csv -a site="https://yoursite.org" 1spider.py
  • python3 2format_results.py
@johndoe46
johndoe46 / example.com.conf
Created May 5, 2017 12:41 — forked from a-vasyliev/example.com.conf
Nginx: proxy cache without utm_* parameters (remove query parameter, remove utm tags nginx)
server {
listen 443;
server_name example.com;
error_log /var/log/nginx/example_com_error.log warn;
ssl on;
ssl_certificate /etc/nginx/ssl/your.crt; #certificate chains
ssl_certificate_key /etc/nginx/ssl/your.key; #private key
@johndoe46
johndoe46 / install_mysql.sh
Created January 21, 2016 08:43 — forked from rrosiek/install_mysql.sh
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Outputs nearly everything to /dev/null since "quiet" on most commands is still noisy.
#! /usr/bin/env bash
# Variables
APPENV=local
DBHOST=localhost
DBNAME=dbname
DBUSER=dbuser
DBPASSWD=test123
echo -e "\n--- Mkay, installing now... ---\n"