Skip to content

Instantly share code, notes, and snippets.

@heitorlessa
heitorlessa / README.md
Last active March 7, 2023 09:36
Open@Amazon Session notes
@ibressler
ibressler / earlygrubcryptoimg.sh
Last active March 10, 2024 22:49
Creates an early grub core image for ESP to cryptmount a LUKS+LVM partition where the grub files /boot/ and the kernel is stored
#!/bin/dash
# Creates a standalone core image with grub to be started by EFI.
# It complements the excellent cryptroot tutorial at
# https://community.linuxmint.com/tutorial/view/2061
# for grub on BTRFS inside LVM inside LUKS.
#
# It initiates decryption of the root device which contains
# LVM with BTRFS on the root volume where grub is installed.
# Therefore, it allows to load grub from an LUKS encrypted BTRFS
# root file system.
@asukakenji
asukakenji / 0-go-os-arch.md
Last active May 6, 2025 13:41
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@mneedham
mneedham / blog.py
Last active July 11, 2022 03:04
Meetup API -> JSON -> CSV using Python's Luigi library
import json
import os
import luigi
import requests
from collections import Counter
from luigi.contrib.external_program import ExternalProgramTask
class Meetup(luigi.WrapperTask):
def run(self):
@stesie
stesie / scan2pdf+ocr.sh
Created February 16, 2017 12:02
Shell script to scan pdf, tesseract (ocr) it and create pdf with down-sampled image with text overlay
#!/usr/bin/env bash
set -e
## SCAN settings
FORMAT="-l 0 -t 0 -x 210 -y 297"
MODE=color
RESOLUTION=300
LANG=deu
postprocess_scan() {
image: debian
before_script:
- apt-get update && apt-get clean
- apt-get install --fix-missing -y python-dev python-pip python-setuptools
- apt-get install --fix-missing -y build-essential
- apt-get install --fix-missing -y libyaml-dev
- apt-get install --fix-missing -y libssl-dev openssl
- apt-get install --fix-missing -y libffi-dev
- apt-get install --fix-missing -y curl tree netcat
@Lahorde
Lahorde / 0_README.md
Last active August 11, 2023 16:52
Initialize an external I2C RTC module on raspberry using udev and systemd

Description

Enable i2c RTC using systemd. A udev rules triggers an I2C systemd service on I2C kernel module adding. Service then loads I2C driver adding a new I2C device to /sys Then kernel loads I2C RTC driver and adds an RTC device It triggers a udev rules that updates hardware clock

Application on raspberry pi

Enable I2C

  • enable I2C in config.txt, adding device_tree_param=i2c1=on
@KartikTalwar
KartikTalwar / Documentation.md
Last active February 28, 2025 10:57
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs