Skip to content

Instantly share code, notes, and snippets.

View EdwinHoksberg's full-sized avatar

Edwin Hoksberg EdwinHoksberg

View GitHub Profile
@matthlavacka
matthlavacka / languages.json
Last active November 22, 2021 08:41
JSON list of main languages with language name and number of speakers
{
"af": {
"name": "Afrikaans",
"speakers": 15200000
},
"am": {
"name": "Amharic",
"speakers": 25800000
},
"sq": {
#!/usr/bin/env python3
from itertools import islice
import re
import requests
from bs4 import BeautifulSoup
if __name__ == '__main__':
stat_soup = BeautifulSoup(requests.get("https://stats.lineageos.org/").content, "lxml")
code_soup = BeautifulSoup(requests.get("https://wiki.lineageos.org/devices/").content, "lxml")
@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active March 16, 2024 13:18
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@marcan
marcan / linux.sh
Last active December 1, 2023 15:18
Linux kernel initialization, translated to bash
#!/boot/bzImage
# Linux kernel userspace initialization code, translated to bash
# (Minus floppy disk handling, because seriously, it's 2017.)
# Not 100% accurate, but gives you a good idea of how kernel init works
# GPLv2, Copyright 2017 Hector Martin <marcan@marcan.st>
# Based on Linux 4.10-rc2.
# Note: pretend chroot is a builtin and affects the current process
# Note: kernel actually uses major/minor device numbers instead of device name
@sdorra
sdorra / keys.go
Created April 17, 2016 19:31
Golang RSA Key Generation
/*
* Genarate rsa keys.
*/
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
@ruario
ruario / h264-vivaldi-linux.md
Last active March 18, 2023 11:17
How to enable HTML5 MP4 (H.264/AAC) video in Vivaldi for Linux, via an alternative FFMpeg library
@flbuddymooreiv
flbuddymooreiv / cryptsetupluks.md
Last active March 25, 2023 19:19
CryptSetup / LUKS cheat sheet
# Install the tools
apt-get install cryptsetup

# -y for password confirmation prompt
cryptsetup -y -v luksFormat /dev/sdx # THIS DELETES ALL THE DATA

# Open it and look at status
cryptsetup luksOpen /dev/sdx cryptoblock
cryptsetup -v status cryptoblock
@samuelsmal
samuelsmal / makefile
Last active July 1, 2023 20:55
Generic clang++ (or c++ for that matter) makefile with directory structure
# Requires the following project directory structure:
# /bin
# /obj
# /src
# Use 'make remove' to clean up the hole project
# Name of target file
TARGET = foooooooobar