Skip to content

Instantly share code, notes, and snippets.

@ansemjo
ansemjo / encrypted-dvd.md
Last active February 13, 2024 11:25
create an encrypted dvd with squashfs and luks

1. Create compressed squashfs image

Use mksquashfs to create a compressed image from a directory. Depending on how compressible the files are you could put on much more than 4.7 GB on a single disc.

mksquashfs /path/to/my/directory image.sqfs

You can use a different compression algorithm with e.g. -comp zstd or append multiple times to one archive to fill it up to almost the allowable size.

2. Reencrypt the image to wrap it in a LUKS container

@stigtsp
stigtsp / wireguard.nix
Created November 20, 2018 14:46
wireguard setup for nixos 18.09 (works with mullvad, default route everything)
{ stdenv, pkgs, lib, ... }:
{
networking.wireguard.interfaces = {
wg0 = {
ips = [ "10.0.0.1/32" "fc00:bbbb:bbbb:bbbb::bbbb/128" ];
privateKeyFile = "/private/wireguard-pk";
table = "51820";
postSetup = ''
wg set wg0 fwmark 51820
ip -6 rule add not fwmark 51820 table 51820
@ladinu
ladinu / encryptedNixos.md
Last active December 8, 2024 12:43
NixOS install with encrypted /boot /root with single password unlock

Requirements

  1. Encrypt everthing including /boot and /root
  2. Enter password once
  3. Support UEFI

Installation media setup

Download NixOS minimal iso and copy to USB stick. For example on Mac OSX

$ diskutil list
$ diskutil unmountDisk /dev/disk1 # Make sure you got right device
@coldacid
coldacid / GpgAgentPipe.cs
Created December 10, 2017 02:38
Prototype connector between gpg-agent and Windows named pipe for Win32-OpenSSH
using System;
using System.IO;
using System.IO.Pipes;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace GpgAgentPipe
{
class Program
@pyar6329
pyar6329 / .envrc
Last active May 23, 2018 21:26
direnv loading env_file of docker-compose
eval $(cat "$(pwd)/docker/env/envfile.env" | grep -v "#" | awk -F= {'print "export "$1"=\""$2"\""'})
@taktoa
taktoa / bootstrap.nix
Last active November 8, 2017 22:52
Portably bootstrap nixpkgs without fetchTarball nonsense
{ system ? builtins.currentSystem }:
# In order to update `nixpkgs.json` to a specific revision, run:
#
# ```bash
# $ nix-prefetch-git https://github.com/NixOS/nixpkgs.git "${REVISION}" > nixpkgs.json
# ```
with rec {
builtin-paths = import <nix/config.nix>;

Installing on Linode

There are now official docs, so follow those as they'll be up-to-date and easier to follow.

Click here to view the old directions

Installing on Linode

@tedivm
tedivm / RoomVisual.js
Last active November 7, 2017 18:55 — forked from AlinaNova21/RoomVisual.js
RoomVisual structure rendering
const colors = {
gray: '#555555',
light: '#AAAAAA',
road: '#666', // >:D
energy: '#FFE87B',
power: '#F53547',
dark: '#181818',
outline: '#8FBB93',
speechText: '#000000',
speechBackground: '#2ccf3b'
@theladyjaye
theladyjaye / decorators.md
Last active May 31, 2022 11:57
Marionette TypeScript Utils
@Brainiarc7
Brainiarc7 / ffmppeg-advanced-playbook-nvenc-and-libav-and-vaapi.md
Last active September 2, 2024 14:37
FFMpeg's playbook: Advanced encoding options with hardware-accelerated acceleration for both NVIDIA NVENC's and Intel's VAAPI-based hardware encoders in both ffmpeg and libav.

FFmpeg and libav's playbook: Advanced encoding options with hardware-based acceleration, NVIDIA's NVENC and Intel's VAAPI-based encoder.

Hello guys,

Continuing from this guide to building ffmpeg and libav with NVENC and VAAPI enabled, this snippet will cover advanced options that you can use with ffmpeg and libav on both NVENC and VAAPI hardware-based encoders.

For ffmpeg: