Skip to content

Instantly share code, notes, and snippets.


Winston Hoy curiousercreative

View GitHub Profile
arm2arm /
Created Apr 6, 2021
rebalance zfs for the cold data
# If you change some settings in the zfs dataset you should rebalance it in order to store data with this current settings.
# Usage:
# zfs set recordsize=1M data/archive
# sh ./ /data/archive| parallel -P 16 --eta
find $mypath -type f | xargs -d '\n' -I{} echo "rsync -a --inplace \"{}\" \"{}.abcdef\";unlink \"{}\";mv \"{}.abcdef\" \"{}\" "

Pure ESM package

The package linked to from here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
qdm12 /
Last active Sep 27, 2022
Wireguard and iptables restrictions for multiple users

Wireguard and iptables restrictions for multiple users

If you don't know what Wireguard is, well, you should. It's fast, easy to setup and highly configurable. We will configure Wireguard for multiple users with various restrictions using iptables.


This should fit most setups (not mine though 😉)

afriza /
Last active Jan 28, 2021
Compiling and installing `vlc` with Decklink SDK on Ubuntu 18.04 Server
jakub-g / _1_"script async defer" blocks "load"
Last active Jul 19, 2022
Beware of "script async defer" blocking HTML "load" event
View _1_"script async defer" blocks "load"

Beware of <script async defer> blocking HTML "load" event

2015.10.07 t

On the importance of simulated latency testing, and bulletproofing your page from the third-party JS load failures




Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

mhussain /
Created May 8, 2012 — forked from smarthall/
Linode dynamic DNS updating script
# modified by jfro from
# Uses curl to be compatible with machines that don't have wget by default
WAN_IP=`curl -s`
if [ -f $HOME/.wan_ip.txt ]; then