Skip to content

Instantly share code, notes, and snippets.

@shift
shift / rpi4_eufi_booting_flatcar.md
Created December 2, 2020 09:21
UEFI/iPXE booting Raspberry Pi for Flatcar Linux

UEFI/iPXE booting Raspberry Pi for Flatcar Linux

Download and compile the following https://github.com/pftf/RPi4.git. I made the following change to edk2-platforms to always enable 3GB RAM+ as TFTP booting this seems to cause issues with it remembering the options.

diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4/RPi4.dsc
index c481c35342..4b495b1fe8 100644
--- a/Platform/RaspberryPi/RPi4/RPi4.dsc
+++ b/Platform/RaspberryPi/RPi4/RPi4.dsc
@@ -495,7 +495,7 @@
@limitedeternity
limitedeternity / BruteZIP.py
Created July 28, 2020 22:23
Zip file bruteforce utility
import argparse
import os
import shutil
import tempfile
from zipfile import ZipInfo, ZipFile
parser = argparse.ArgumentParser(description="Unzips a password protected .zip by performing a brute-force attack "
"using either a word list, password list or a dictionary.",
usage="BruteZIP.py -z zip.zip -d dict.txt")
parser.add_argument("-z", "--zip", metavar="", required=True, help="Path to the .zip file.")
@felix19350
felix19350 / ktor-full-example.kt
Last active July 15, 2023 12:42
Barebones Ktor REST API example
package org.example
import com.zaxxer.hikari.HikariConfig
import com.zaxxer.hikari.HikariDataSource
import io.ktor.application.call
import io.ktor.http.HttpStatusCode
import io.ktor.request.receive
import io.ktor.response.respond
import io.ktor.routing.Route
import io.ktor.routing.get
@iamtakingiteasy
iamtakingiteasy / master-and-worker-ignition.yaml
Last active December 24, 2021 14:21
CoreOS ignition file for setting up kubernetes master+worker node
passwd:
users:
- name: "root"
groups:
- "sudo"
- "wheel"
password_hash: "$6$gO2u2Sjk$Q5T/SqiwFzK95jRqO6FArDDmDGmdXblnKHtL4HiA.NrGgfJk8CJF5AfAfoMt8kF/jlsqHEgRDxYOFYzw9sroS/"
- name: "user"
groups:
- "sudo"
@natecostello
natecostello / README.md
Last active March 28, 2022 14:49
PlusNut Installation Primer

This is a primer on how to install PlusNuts using materials readily available from your local hardware store.

About PlusNuts

PlusNuts, sometimes called "pre-bulbed cross nuts," are a machine threaded sheet metal equivalent to a drywall anchor. They are useful because they can be installed into a thin metal surface, blind (i.e. with access from only one side). Here are two pictures of a PlusNut, before and after installation (backside view):

@dghubble
dghubble / kubeception.md
Last active April 24, 2025 02:03
Running QEMU/KVM and Nested Kubernetes on Bare-Metal Kubernetes
@palankai
palankai / specification.py
Last active May 7, 2025 11:46
Python Specification Pattern
class Specification:
def __and__(self, other):
return And(self, other)
def __or__(self, other):
return Or(self, other)
def __xor__(self, other):
return Xor(self, other)
@samuelcolvin
samuelcolvin / aiopg playing with aiohttp and gunicorn.md
Last active August 7, 2020 14:01
aiopg playing with aiohttp and gunicorn

aiopg playing with aiohttp and gunicorn

Setup

virtualenv -p /usr/bin/python3.5 env && source env/bin/activate
pip install SQLAlchemy aiohttp aiopg gunicorn

Usage

@RichardBronosky
RichardBronosky / pep8_cheatsheet.py
Created December 27, 2015 06:25
PEP-8 cheatsheet
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""This module's docstring summary line.
This is a multi-line docstring. Paragraphs are separated with blank lines.
Lines conform to 79-column limit.
Module and packages names should be short, lower_case_with_underscores.
Notice that this in not PEP8-cheatsheet.py
Because of 'Meslo for Powerline' font doens't work with Putty.
So we need another patched font to display powerline correctly.
Here are the list:
- DejaVu Sans Mono for Powerline (https://github.com/powerline/fonts/tree/master/DejaVuSansMono)
- Droid Sans Mono for Powerline (https://github.com/powerline/fonts/tree/master/DroidSansMono)
To change font: On main window (Putty Configuration) -> Window -> Apearance -> Font settings -> Change
To test, enter this in the terminal screen: echo "\ue0b0 \u00b1 \ue0a0 \u27a6 \u2718 \u26a1 \u2699"