Skip to content

Instantly share code, notes, and snippets.

View nexus166's full-sized avatar
🌪️
🐧

nexus166

🌪️
🐧
  • Earth
View GitHub Profile
@nexus166
nexus166 / generate_directory_index_caddystyle.py
Created January 22, 2021 02:29 — forked from glowinthedark/generate_directory_index_caddystyle.py
Generate directory index (recurse subfolders with `-r` or `--recursive`). Use `-h` or `--help` for all options
#!/usr/bin/env python3
# ---
# Copyright 2020 glowinthedark
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
@nexus166
nexus166 / README.md
Last active March 28, 2020 05:35 — forked from mosquito/README.md
Add doker-compose as a systemd unit
cat <<'EOF' > '/etc/systemd/system/docker-compose@.service'
[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service

[Service]
Restart=always
WorkingDirectory=/etc/docker/compose/%i
@nexus166
nexus166 / rpi-debootstrap.sh
Last active March 21, 2022 14:04 — forked from G-UK/Debootstrap Debian Arm64 OS for Raspberry Pi 3 & 4.md
Build a 64bit Debian OS for the Raspberry Pi using Debootstrap
#!/usr/bin/env bash
set -xeo pipefail;
IMAGE_SIZE=2000M
BOOT_SIZE=256M
IMAGE_ARCH=arm64
while getopts "s:" option; do
case $option in
@nexus166
nexus166 / fake-uname.c
Created March 18, 2020 16:39 — forked from DamnedFacts/fake-uname.c
Fake uname information in order to make tools, such as megacli, work: Gentoo-11 tmp # gcc -Wall -fPIC -c fake-uname.c Gentoo-11 tmp # gcc -Wall -shared -o libfake-uname.so fake-uname.o Now we get libfake-uname.so, use LD_PRELOAD=./libfake-uname.so to preload it, over uname from glibc: Gentoo-11 tmp # LD_PRELOAD=./libfake-uname.so LD_LIBRARY_PATH…
#define _GNU_SOURCE
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/utsname.h>
#include <stdio.h>
#include <string.h>
int uname(struct utsname *buf)
@nexus166
nexus166 / sshd.go
Created February 23, 2020 17:07 — forked from jpillora/sshd.go
Go SSH server complete example - Read more here https://blog.gopheracademy.com/go-and-ssh/
// A small SSH daemon providing bash sessions
//
// Server:
// cd my/new/dir/
// #generate server keypair
// ssh-keygen -t rsa
// go get -v .
// go run sshd.go
//
// Client:

Problem

In Arch Linux mkinitcpio -p linux

shows

Possibly missing firmware for module: aic94xx
 Possibly missing firmware for module: wd719x
@nexus166
nexus166 / tpm2.0-fulldisk-decryption-at-boot.md
Created January 21, 2020 13:28 — forked from stengoes/tpm2.0-fulldisk-decryption-at-boot.md
Setup TPM2.0 for full disk decryption at boot

First step: install tpm2-tss, tpm2-tools and all its depedencies.

# Install dependencies
sudo apt-get update && sudo apt-get -y install autoconf autoconf-archive automake libtool pkg-config gcc libssl-dev libcurl4-gnutls-dev doxygen

# Install tpm2-tss
git clone https://github.com/tpm2-software/tpm2-tss.git
cd tpm2-tss
git checkout e05d28ec  # I used this particular commit
./bootstrap
@nexus166
nexus166 / emoji.go
Last active November 5, 2019 02:27 — forked from YamiOdymel/emoji.go
golang codepage emojis
package main
import (
"fmt"
"html"
)
func main() {
// Hexadecimal ranges from: http://unicode.myseosolution.de/
emoji := [][]int{
apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterConfiguration
kubernetesVersion: v1.14.3 # change according to kubeadm supported version
apiServer:
certSANs:
- 127.0.0.1
- cluster-api.example.com # change according to your requirements
extraArgs:
authorization-mode: Node,RBAC
feature-gates: "TTLAfterFinished=true"