Skip to content

Instantly share code, notes, and snippets.

View tlex's full-sized avatar
I may be slow to respond.

Alex Thomae tlex

I may be slow to respond.
View GitHub Profile
@smoser
smoser / README.md
Last active May 2, 2024 09:23
qemu to linux mapping of smbios / dmi information

Mappings for DMI/SMBIOS to Linux and dmidecode

Information can be put into dmi tables via some qemu-system hosts (x86_64 and aarch64). That information is exposed in Linux under /sys/class/dmi/id and can be read with dmidecode. The names are very annoyingly inconsistent. The point of this doc is to map them.

Mappings

Example qemu cmdline:

qemu-system-x86_64 -smbios type=<type>,field=value[,...]

qemu-system-x86_64 -smbios type=0,vendor=superco,version=1.2.3
@marcelschmidtdev
marcelschmidtdev / upd.php
Last active April 10, 2023 20:26
Fritz!Box DynDNS update script for Cloudflare
<?php
// Fritz!Box update URL: https://example.com/upd.php?key=<pass>&zone=<domain>&ipv4=<ipaddr>&a=[records to update]
// Replace [records to update] in the url.
// If you want to update multiple records of your zone, just add them comma separated: '&a=sub,sub2,*,@'
// Optionally you can update AAAA records by appending '&ipv6=<ip6addr>&aaaa=[records to update]' to the url.
// If no AAAA record is defined but ipv6 is used, it will update both ip4 and ip6 defined for A records.
// $_SERVER['REMOTE_ADDR'] no longer works as FritzOS 7.50 started using IPv6
$key = $_GET['key'] ?? NULL;
$zone = $_GET['zone'] ?? NULL;
@ptts
ptts / updateDns.php
Created December 2, 2017 17:00 — forked from Doxylamin/updateDns.php
Cloudflare + FritzBox -> DynDNS
<?php
/*
FRITZ!Box DynDNS Howto:
Update-URL: http://your-domain.tld/filename.php?user=<username>&pass=<pass>&hostname=<domain>&myip=<ipaddr>
Domainname: dyndns.your-domain.tld
Username: your-cloudflare-email-address
Password: your-cloudflare-api-token
*/
// static config:
@bmhatfield
bmhatfield / .profile
Last active March 18, 2024 07:43
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@martijnvermaat
martijnvermaat / ssh-agent-forwarding-screen.md
Created December 21, 2013 15:06
SSH agent forwarding and screen

SSH agent forwarding and screen

When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.

This is enabled by adding the

ForwardAgent yes

option to any of your Host entries in ~/.ssh/config (or alternatively with the -A option). Don't set this option in a wildcard Host * section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.