Skip to content

Instantly share code, notes, and snippets.

View fadenb's full-sized avatar

Tristan Helmich fadenb

View GitHub Profile
@fadenb
fadenb / 2023-12-21_Apple_Public_Verification_Code.txt
Created December 21, 2023 12:36
My Apple Contact Key Verification Public Verification Code
APKTIDoLV060B_LpPwpXFQqH8HTJF7CcJHMGGIpfDWOPT1dYGU_g
@m-radzikowski
m-radzikowski / script-template.sh
Last active April 25, 2024 18:43
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
################################################################
################################################################
## ##
## This module now lives in a repository! ##
## https://github.com/dali99/nixos-matrix-modules ##
## ##
## It has a few fixes, and quite a few more features, ##
## like easy workers and automatic nginx config ##
## ##
################################################################
@dysinger
dysinger / nixos-encrypted-zfs.sh
Last active March 7, 2023 14:51
How I installed Encrypted ZFS root on NixOS
# MOVED HERE https://gist.github.com/dysinger/2a768db5b6e3b729ec898d7d4208add3
@Profpatsch
Profpatsch / build-go-pkg.sh
Created December 5, 2016 12:46
help with packaging go packages in nix
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p go go2nix
# little script to help with the stupid go packaging
# cd into the dir where you want to have the `default.nix`
# go package name (e.g. github.com/go/is-stupid)
PACKAGE="$1"
# git upstream link
GIT="$2"
@joschi
joschi / graylog_token.txt
Last active September 28, 2023 04:27
Graylog access token login
# Create an access token for user "admin" with name "test-1234"
# POST /users/{username}/tokens/{name}
$ curl -i -u admin:admin -H 'Accept: application/json' -X POST 'http://127.0.0.1:12900/users/admin/tokens/test-1234?pretty=true'
HTTP/1.1 200 OK
X-Graylog-Node-ID: cd03ee44-b2a7-4824-be16-bb7456149dbd
Content-Type: application/json
Date: Mon, 08 Aug 2016 12:12:09 GMT
Content-Length: 139
{
@Caligatio
Caligatio / iptables.grok
Created August 6, 2016 10:45
iptables Grok Pattern
# GROK Custom Patterns (add to patterns directory and reference in GROK filter for iptables events):
# GROK Patterns for iptables Logging Format
#
# Created 6 Aug 2016 by Brian Turek <brian.turek@gmail.com>
# Most of this was taken from another source but now I cannot find it for credit
#
# Usage: Use the IPTABLES pattern
NETFILTERMAC %{MAC:dest_mac}:%{MAC:src_mac}:%{ETHTYPE:ethtype}
ETHTYPE (?:(?:[A-Fa-f0-9]{2}):(?:[A-Fa-f0-9]{2}))
@RafPe
RafPe / vyos-optimisations
Last active April 8, 2024 22:06
vyos throughput optimizations
Server 2 sockets,6 cores each, 2.4ghz
# Set ixgbe options
# Limit RSS queues to the number of physical cores per cpu
# Disable offload
# When you change this, you need to run the command and reboot for it to take.
echo "options ixgbe LRO=0,0 MQ=1,1 RSS=6,6 VMDQ=0,0 vxlan_rx=0,0" > /etc/modprobe.d/ixgbe.conf
# Shut down HT cores
for i in $(seq 1 2 23); do
@barentsen
barentsen / gist:bacd4360fb31e7456d659d07b014e834
Created June 21, 2016 09:01
How to get clickshare working on Ubuntu 16.04
sudo apt install libresample1
wget http://mirrors.kernel.org/ubuntu/pool/universe/liba/libav/libavutil52_9.18-0ubuntu0.14.04.1_amd64.deb
sudo dpkg -i libavutil52_9.18-0ubuntu0.14.04.1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/liba/libav/libswscale2_9.18-0ubuntu0.14.04.1_amd64.deb
sudo dpkg -i libswscale2_9.18-0ubuntu0.14.04.1_amd64.deb
wget https://www.dropbox.com/s/gg2i5wszrqkhzy8/clickshare_01.07.01-79_amd64.deb?dl=0#
sudo dpkg -i clickshare_01.07.01-79_amd64.deb
@vasanthk
vasanthk / System Design.md
Last active April 26, 2024 18:05
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?