Skip to content

Instantly share code, notes, and snippets.

View andir's full-sized avatar

Andreas Rammhold andir

View GitHub Profile
@leucos
leucos / main.go
Last active March 23, 2023 17:11
Vade Retro Spamcause (X-VR-SPAMCAUSE) Golang decoder
package main
import (
"fmt"
"os"
)
func main() {
if len(os.Args) != 2 {
fmt.Println("usage: spamcause gggruggvucft...")
@klingtnet
klingtnet / how-to-upgrade-nvmw-ssd-firmware-on-linux.md
Last active September 16, 2023 23:37
How to upgrade [Lenovo] NVMe SSD firmware on Linux

The instructions were tested on a Lenovo X1 Carbon 5th Gen (X1C5) on Arch Linux but should be applicable to other Lenovo models and Linux distributions.

BACKUP YOUR DATA! I created a bootable Ubuntu Image like this:

$ sudo sh -c 'curl --location --silent --fail "http://releases.ubuntu.com/18.04/ubuntu-18.04.1-desktop-amd64.iso" | pv > /dev/<your-usb-drive>'
# note that pv is only there to show progress, it is perfectly fine to redirect curl to the usb drive directly.

then I booted from this drive by pressing F12 on reboot and dumped my NVMe disk to an external hard drive like this:

@red-hood
red-hood / methods.md
Last active July 13, 2018 21:57
Local libvirt deployments
@joepie91
joepie91 / .md
Last active March 13, 2024 18:47
A *complete* listing of operators in Nix, and their predence.

Lower precedence means a stronger binding; ie. this list is sorted from strongest to weakest binding, and in the case of equal precedence between two operators, the associativity decides the binding.

Prec Abbreviation Example Assoc Description
1 SELECT e . attrpath [or def] none Select attribute denoted by the attribute path attrpath from set e. (An attribute path is a dot-separated list of attribute names.) If the attribute doesn’t exist, return default if provided, otherwise abort evaluation.
2 APP e1 e2 left Call function e1 with argument e2.
3 NEG -e none Numeric negation.
4 HAS_ATTR e ? attrpath none Test whether set e contains the attribute denoted by attrpath; return true or false.
5 CONCAT e1 ++ e2 right List concatenation.
6 MUL e1 * e2 le
@flokli
flokli / raspberry_pi_touch.md
Last active October 20, 2023 09:50
Raspberry Pi with LCD display

Raspberry Pi with Touch Display - Installation Instructions

Operating System

  • prepare an SD Card as described on archlinuxarm.org
  • SSH into your system, add your public key (initial root password is "root")
  • disable root password by calling passwd -d root
  • set a useful hostname by calling echo $hostname > /etc/hostname
  • run pacman -Suy to update packages

Hardware support

LCD Module

@chanj
chanj / AWS Security Resources
Last active June 21, 2021 09:49
AWS Security Resources
INTRO
I get asked regularly for good resources on AWS security. This gist collects some of these resources (docs, blogs, talks, open source tools, etc.). Feel free to suggest and contribute.
Short Link: http://tiny.cc/awssecurity
Official AWS Security Resources
* Security Blog - http://blogs.aws.amazon.com/security/
* Security Advisories - http://aws.amazon.com/security/security-bulletins/
* Security Whitepaper (AWS Security Processes/Practices) - http://media.amazonwebservices.com/pdf/AWS_Security_Whitepaper.pdf
* Security Best Practices Whitepaper - http://media.amazonwebservices.com/AWS_Security_Best_Practices.pdf
@sehe
sehe / .gitignore
Created October 13, 2012 20:34
Parsing a number of named sets of other named sets
test
*.o
*~
*.sw?