Skip to content

Instantly share code, notes, and snippets.

View 0xd61's full-sized avatar
๐Ÿš€
Focusing

Daniel Glinka 0xd61

๐Ÿš€
Focusing
View GitHub Profile
@0xd61
0xd61 / gpg-ssh-setup.md
Created May 9, 2026 16:20 — forked from mcattarinussi/gpg-ssh-setup.md
A setup guide to use a personal gpg key for ssh authentication

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  โ–ถ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.

@0xd61
0xd61 / gpg-help.md
Created April 22, 2026 00:45 — forked from celestino/gpg-help.md
GPG export/import notes
echo 1 > /proc/sys/kernel/sysrq
echo s > /proc/sysrq-trigger #sync
echo u > /proc/sysrq-trigger #unmount + mount readonly
echo b > /proc/sysrq-trigger #reboot
@0xd61
0xd61 / udev-commands.md
Last active December 12, 2022 18:28
Useful udev Commands

Test systemd-networkd link settings

udevadm -d test-builtin net_setup_link /sys/class/net/eth0

Testing udev rules

udevadm test /sys/class/net/eth0

Get info of network device

@0xd61
0xd61 / build.sh
Last active October 2, 2021 23:34
Linux C++ default buildfile
#!/usr/bin/env sh
set -e
APP_NAME="myapp"
DEFINE_PREFIX="MYAPP"
BINARY="${APP_NAME}_linux_x86_64"
BASE_DIR="$PWD"
PLATFORM_DIR="$(dirname "$0")"
PLATFORM_NAME="$(basename "${PLATFORM_DIR}")"
@0xd61
0xd61 / kvm.nix
Created July 24, 2021 00:32 — forked from Nekroze/kvm.nix
NixOS Declarative KVM Guests
## Builder for NixOS configurations defined at the end of the file to be built into KVM VM's
{ system ? builtins.currentSystem }:
let
loadcfg = cfgfile: { config, pkgs, ...}: {
imports = [ <nixos/modules/virtualisation/qemu-vm.nix> cfgfile ];
config = {
networking.extraHosts = ''
176.32.0.254 template
'';
// grab the URLs
var urls = $('.tile--img__img').map(function(idx, el) { return el.src});
// write the URls to file (one per line)
var textToSave = urls.toArray().join('\n');
var hiddenElement = document.createElement('a');
hiddenElement.href = 'data:attachment/text,' + encodeURI(textToSave);
hiddenElement.target = '_blank';
hiddenElement.download = 'urls.txt';
hiddenElement.click();
@0xd61
0xd61 / shell.nix
Last active September 19, 2021 20:45
Nix shell env template
# This shell defines a development environment for a c project.
{
pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/39e6bf76474ce742eb027a88c4da6331f0a1526f.tar.gz") {}
}:
# Override packages if necessary
#let
# newExample = pkgs.example.override {
# option = example
# };
@0xd61
0xd61 / qemu_rpi.sh
Created October 7, 2020 19:59
Script to run an rpi image on QEMU
#!/bin/sh
# This script follows the instructions found in https://github.com/dhruvvyas90/qemu-rpi-kernel
QEMU=`which qemu-system-arm`
BASE_DIR=.
RPI_KERNEL=${BASE_DIR}/kernel-qemu-5.4.51-buster
RPI_DTB=${BASE_DIR}/versatile-pb-buster.dtb
IMAGE_BASE=2020-08-20-raspios-buster-armhf-lite
IMAGE=${IMAGE_BASE}.img
@0xd61
0xd61 / gibbon_markbook_query.sql
Last active September 18, 2020 15:07
MySQL queries and procedures for gibbon
-- Procedure to export grades for a year and class from the markbook
DROP PROCEDURE IF EXISTS customMarkbookGrades;
DELIMITER $$
CREATE PROCEDURE customMarkbookGrades (
IN school_year_id int(3),
IN year_group VARCHAR(256),
IN class_name VARCHAR(256),
IN grade_type VARCHAR(256)