Skip to content

Instantly share code, notes, and snippets.

@Kranzes
Kranzes / guide.md
Last active November 14, 2024 08:26
SSH Resident Key Guide

Initial checks

Start by checking that there aren't any previous ssh keys inside the FIDO2 authenticator of your YubiKey. You can check if they exist by running the command below:

nix shell nixpkgs#yubikey-manager -c ykman fido credentials list

If the command above outputs a string mentioning "ssh" or "openssh", then you have already got a key generated and store on your YubiKey.

Evaluating additional authentication factors

Before generating a new ssh key to store on your YubiKey you must consider which additional required authentication factors you want to use. Below you can see a table with the available factors and their corresponding command:

@Sitin
Sitin / setup.sh
Last active November 2, 2024 21:26
Run x86-64 Docker images on Raspberry Pi 4 (QEMU/QUS)
# Setup QEMU for x86-64 Docker images on Raspberry Pi 4
# Install Python3 and Docker first: https://dev.to/rohansawant/installing-docker-and-docker-compose-on-the-raspberry-pi-in-5-simple-steps-3mgl
# Install QUEMU (https://www.qemu.org/)
sudo apt-get install qemu binfmt-support qemu-user-static
# Use QUS in Docker (https://github.com/dbhi/qus) to configure x86_64 architecture
docker run --rm --privileged aptman/qus -s -- -p x86_64
# Test x86-64 image:
@John-Paul-R
John-Paul-R / FabricModList.md
Last active October 21, 2024 07:40
A list of (almost all) mods for Fabric

Fabric Mod List

This page contains a list of the current Minecraft Fabric mods. (As of 2021-08-19 08:05:23 Timezone: UTC+0000 (GMT))

To search for mods by name, category, or download count, visit the website, fibermc.com!

Note: You can view a mod's source files by following the "Source" link on its CurseForge page, assuming that the mod's creator has made such files public.

There are currently 2954 mods in this list.

@gsxryan
gsxryan / SuccessRates.sh
Last active July 28, 2019 18:31
StorJ V3 Node Success Rates Calculation
#A StorJ node monitor script by turbostorjdsk / KernelPanick
#Node Success Rates
#count of unrecoverable failed audits
audit_failed_crit=$(sudo docker logs storagenode 2>&1 | grep GET_AUDIT | grep failed | grep open -c)
if [ $audit_failed_crit -ge 1 ]
then echo CRITICAL: Unrecoverable Failed Audits: $audit_failed_crit
fi
#count of recoverable failed audits`
audit_failed_warn=$(sudo docker logs storagenode 2>&1 | grep GET_AUDIT | grep failed | grep -v open -c)
///// TODO : Replace <<LAN_INTERFACE>> with internal bridge or lan interface, replace <<<PPPOE_DIGI_INTERFACE>>> with the pppoe-digi interface
/ipv6 nd
set [ find default=yes ] disabled=yes
add advertise-dns=yes interface=<<LAN_INTERFACE>>
/ipv6 dhcp-client
add add-default-route=yes interface=<<<PPPOE_DIGI_INTERFACE>>> pool-name=pool6 request=address,prefix script=":del\
ay 5s;\
\n/ipv6 address remove [find advertise=yes]\
@kekru
kekru / 01nginx-tls-sni.md
Last active October 8, 2024 10:16
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled
@oguya
oguya / fah-config.xml
Created September 30, 2015 12:21
FAHClient config. file—/etc/fahclient/config.xml
<config>
<!-- See sample config: /usr/share/doc/fahclient/sample-config.xml -->
<!-- Client Control
Don't fold anonymously, provide user info. -->
<fold-anon v='false'/>
<!-- Folding Slot Configuration -->
<gpu v='true'/> <!-- If true, attempt to autoconfigure GPUs -->