Skip to content

Instantly share code, notes, and snippets.

View danielb2's full-sized avatar

Daniel Bretoi danielb2

View GitHub Profile
@danielb2
danielb2 / readme.md
Created August 29, 2023 16:52 — forked from nfriedly/chirp-audiobooks-downloader-readme.md
Chirp Audiobook Download Script

Chirp AudioBook Download Script

This script eases the process of downloading the audio files from Chirp Audiobooks. It uses the browsers console to generate a list of URLs, and then provides a list of wget commands to download them.

Tested with Firefox on MacOS. Might need some small tweaks for Windows.

Instructions

  1. Find the book in your Chirp Library
@danielb2
danielb2 / readme.md
Last active July 9, 2022 16:26
Alpine Linux with root on ZFS with native encryption

Setting up Alpine Linux using ZFS with a pool that uses ZFS' native encryption capabilities.

Download

Download the extended release from https://www.alpinelinux.org/downloads/ as only it contains the zfs kernel mods at the time of this writing (2020.07.10)

Write it to a USB and boot from it.

Initial setup

@danielb2
danielb2 / cloudSettings
Last active July 25, 2019 17:46
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-07-25T17:46:46.980Z","extensionVersion":"v3.4.1"}
@danielb2
danielb2 / ex.js
Last active October 6, 2018 05:40
proxy play
class Foo {}
handler = {};
handler.construct = function (klass, args) {
console.log(`called constructor with ${JSON.stringify(args)}`);
return new klass(...args);
};
FooProxy = new Proxy(Foo, handler);
``` bash
[~/tmp]$ ls -lh j1 j2 z1 z2
-rw-r--r-- 1 daniel daniel 174M Apr 10 13:11 j1
-rw-r--r-- 1 daniel daniel 174M Apr 10 13:11 j2
-rw-r--r-- 1 daniel daniel 731M Apr 10 13:10 z1
-rw-r--r-- 1 daniel daniel 731M Apr 10 13:10 z2
$ sudo zpool create ztest mirror (pwd)/j1 (pwd)/j2
$ sudo zpool set autoexpand=on ztest
@danielb2
danielb2 / sanji.pac
Last active December 30, 2015 16:06
function FindProxyForURL(url, host)
{
return "PROXY 192.168.1.6:8888;";
}
@danielb2
danielb2 / doc.md
Last active December 26, 2015 20:14

alternatives

Generates a type that will match one of the provided alternative schemas via the try() method. If no schemas are added, the type will not match any value except for undefined. Schemas can be expressed as multiple arguments or given as an array.

Supports the same methods of the any() type.

var alt = Joi.alternatives().try(Joi.number(), Joi.string());
{
"name": "foo",
"version": "1.0.0",
"description": "good log trial thing",
"main": "./start.js",
"author": "me",
"dependencies": {
"blipp": "2.x.x",
"good": "6.x.x",
"good-console": "5.x.x",
@danielb2
danielb2 / node-toolbox.md
Last active October 30, 2015 04:17
A node toolbox

Node Toolbox

A curated list of popular and best npm packages for various categories

Web Frameworks

@danielb2
danielb2 / plugin.js
Last active September 29, 2015 03:10
despite dependency setting, this fail to work in hapi 9.x and node 4.x
exports.register = function (server, options, next) {
server.dependency(['h2o2']);
server.route({
method: 'GET',
path: '/{url*}',
config: {
handler: {
proxy: {