Skip to content

Instantly share code, notes, and snippets.

View curiousercreative's full-sized avatar

Winston Hoy curiousercreative

View GitHub Profile
@arm2arm
arm2arm / rebalance_zfs.sh
Created April 6, 2021 15:59
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 ./rebalance_zfs.sh /data/archive| parallel -P 16 --eta
mypath=$1
find $mypath -type f | xargs -d '\n' -I{} echo "rsync -a --inplace \"{}\" \"{}.abcdef\";unlink \"{}\";mv \"{}.abcdef\" \"{}\" "
@sindresorhus
sindresorhus / esm-package.md
Last active December 3, 2024 12:30
Pure ESM package

Pure ESM package

The package that linked you 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
qdm12 / README.md
Last active November 28, 2024 19:24
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.

Assumptions

This should fit most setups (not mine though 😉)

@afriza
afriza / INSTALLING-vlc-with-decklink-support.md
Last active January 28, 2021 03:56
Compiling and installing `vlc` with Decklink SDK on Ubuntu 18.04 Server
@jakub-g
jakub-g / _1_"script async defer" blocks "load" event.md
Last active August 22, 2023 10:10
Beware of "script async defer" blocking HTML "load" event

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

TL;DR

@protrolium
protrolium / ffmpeg.md
Last active November 24, 2024 04:41
ffmpeg guide

ffmpeg

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
mhussain / update-dns.sh
Created May 8, 2012 10:15 — forked from smarthall/update-dns.sh
Linode dynamic DNS updating script
#!/bin/sh
# modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script
# Uses curl to be compatible with machines that don't have wget by default
LINODE_API_KEY=licensekey
DOMAIN_ID=domainid
RESOURCE_ID=resourceid
WAN_IP=`curl -s ifconfig.me/ip`
if [ -f $HOME/.wan_ip.txt ]; then