Skip to content

Instantly share code, notes, and snippets.

View tamlyn's full-sized avatar

Tamlyn Rhodes tamlyn

View GitHub Profile
@nick-thompson
nick-thompson / Freeverb.js
Created April 4, 2022 15:23
An implementation of the Freeverb algorithm in JavaScript using Elementary Audio.
/* First, our Schroeder-Moorer filtered-feedback comb-filters
*
* @param {string} name – for identifying our feedback taps
* @param {number} size – for defining our feedback tap lengths
* @param {Node | number} feedback: [0, 1) – how long the reverb should ring out
* @param {Node | number} damping : [0, 1) – pole position of the lowpass filter
* @param {Node} xn – input signal to filter
*
* @see https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html
*/
@aularon
aularon / m4b_split.sh
Last active September 21, 2023 13:34
Split an m4b into its chapters. No recoding is done, just splitting
#!/bin/bash
# Description: Split an m4b into its chapters. No recoding is done, just splitting
# Usage: m4b_split.sh $input_file $output_dir/
# Requires: ffmpeg, jq
# Author: Hasan Arous
# License: MIT
in="$1"
out="$2"
splits=""
@tamlyn
tamlyn / Readme.md
Created May 20, 2020 09:33
Camunda

Issues with Camunda

It fails to deliver on its promise

The idea is nice:

  • You separate the business rules from the code.
  • You use a graphical language that non-developers can understand.
  • The developers then write adapters for the business process diagram to enact the business rules.
  • Non-developers can both see and edit the business flow at any time in response to changing business needs.
@arturo182
arturo182 / bom2grouped_csv_jlcpcb.xsl
Last active April 24, 2024 16:08
A KiCad BOM script for generating JLCPCB PCBA-compatible files!
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format
Copyright (C) 2014, Wolf Walter.
Copyright (C) 2013, Stefan Helmert.
Copyright (C) 2018, Kicad developers.
Copyright (C) 2019, arturo182.
GPL v2.
Functionality:
Generation of JLCPCB PCBA compatible BOM
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 23, 2024 11:47
set -e, -u, -o, -x pipefail explanation
@gilrosenthal
gilrosenthal / Fast.ai install script
Created July 4, 2018 20:14
Fast.ai Install on Google Colab
!pip install fastai
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python
import cv2
from os import path
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())
accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'
!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.3.0.post4-{platform}-linux_x86_64.whl torchvision
@ceejbot
ceejbot / esm_in_node_proposal.md
Last active July 17, 2023 02:45
npm's proposal for supporting ES modules in node

ESM modules in node: npm edition

The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.

Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.

This repo also contains a bundled version of npm that has a new command, asset. You can read the documentation for and goals of that comma

@dusanmarsa
dusanmarsa / clipboard-paste-image.js
Created October 29, 2017 08:43
JavaScript - Clipboard API - Paste image handler
var IMAGE_MIME_REGEX = /^image\/(p?jpeg|gif|png)$/i;
var loadImage = function (file) {
var reader = new FileReader();
reader.onload = function(e){
var img = document.createElement('img');
img.src = e.target.result;
var range = window.getSelection().getRangeAt(0);
range.deleteContents();
const MODULE_DIR = /(.*([\/\\]node_modules|\.\.)[\/\\](@[^\/\\]+[\/\\])?[^\/\\]+)([\/\\].*)?$/g;
{
loader: 'babel-loader',
test: /\.jsx?$/,
include(filepath) {
if (filepath.split(/[/\\]/).indexOf('node_modules')===-1) return true;
let pkg, manifest = path.resolve(filepath.replace(MODULE_DIR, '$1'), 'package.json');
try { pkg = JSON.parse(fs.readFileSync(manifest)); } catch (e) {}
return !!(pkg.module || pkg['jsnext:main']);
@kekru
kekru / Docker connect to remote server.md
Last active April 15, 2024 16:26
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.