Skip to content

Instantly share code, notes, and snippets.

@gangefors
gangefors / Install FreeNAS SCALE on a partition and create a mirror.md
Last active May 6, 2024 08:52
How to install TrueNAS SCALE on a partition instead of the full disk

Install TrueNAS SCALE on a partition instead of the full disk

The TrueNAS installer doesn't have a way to use anything less than the full device. This is usually a waste of resources when installing to a modern NVMe which is usually several hundred of GB. TrueNAS SCALE will use only a few GB for its system files so installing to a 16GB partition would be helpful.

The easiest way to solve this is to modify the installer script before starting the installation process.

@WebReflection
WebReflection / builtin-extends-only.md
Last active May 6, 2024 08:51
Builtin Extends Only

Builtin Extends Only

This gist simply lists all elements that can't be extended on "the platform" if not through the Custom Elements builtin extends feature.

This list does not focus on the "why would you?" rather on the "why can't you?" (on Safari) question out there, using the Permitted Parent section out of MDN Element Reference.

@WebReflection
WebReflection / esx.md
Last active May 6, 2024 08:49
Proposal: an ESX for JS implementation
@surma
surma / .gitignore
Created February 1, 2023 15:48
Wasm GC
*.wasm
@pb111
pb111 / Exploratory Data Analysis with Python.ipynb
Created February 14, 2019 01:51
Exploratory Data Analysis with Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ygotthilf
ygotthilf / jwtRS256.sh
Last active May 6, 2024 08:48
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@karpathy
karpathy / min-char-rnn.py
Last active May 6, 2024 08:47
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@s3rvac
s3rvac / double-dispatch.cpp
Last active May 6, 2024 08:46
An example of using double dispatch in C++ to implement expression evaluation without type casts.
// $ g++ -std=c++14 -pedantic -Wall -Wextra double-dispatch.cpp -o double-dispatch
// $ ./double-dispatch
//
// Also works under C++11.
#include <iostream>
#include <memory>
#if __cplusplus == 201103L
namespace std {
@deveworld
deveworld / encode.py
Last active May 6, 2024 08:45
Diff-SVC Audio Data Preprocess Python Script
import os
import glob
import parmap
import multiprocessing
import subprocess as sp
FFMPEG_BIN = "ffmpeg"
def encode(input, output_path):