Skip to content

Instantly share code, notes, and snippets.

@qguv
qguv / baghrir_recept.txt
Created Jan 14, 2021
Baghrir recipe (Dutch)
View baghrir_recept.txt
350 gr meel
150 gr griesmeel
Zakje bakpoeder
Zakje instant gist
800 ml lauw water
Snufje zout
Goed met elkaar mengen. Plaats t in n badje met lauw water en niet met gekookt water. Laat t rusten voor ongeveer 20 min.
Pan na iedere pannenkoek omspoelen met water
View basics.scm
; this can be evaluated at https://inst.eecs.berkeley.edu/~cs61a/fa14/assets/interpreter/scheme.html
(define
(square x)
(* x x)
)
(define
(range start length)
(if
@qguv
qguv / template.sh
Created Dec 17, 2020
Simple template renderer in POSIX sh
View template.sh
#!/bin/sh
# see https://serverfault.com/a/699377 and https://serverfault.com/a/925072
PROG=$(basename $0)
usage() {
echo "${PROG} <template-file> [config-file]"
}
expand() {
@qguv
qguv / GMSE01.ini
Created Oct 23, 2020
Dolphin Emulator settings for Super Mario Sunshine (GameCube, NTSC, USA)
View GMSE01.ini
# Dolphin game-specific settings for: Super Mario Sunshine (GameCube, NTSC, USA)
# https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Sunshine
[Core]
# Avoids crashing after long periods of play
SyncGPU = True
[Video_Enhancements]
@qguv
qguv / example.com.conf
Created Jul 29, 2020
nginx host static files, add trailing slash when using implicit index.html, preserve anchors and queries
View example.com.conf
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name example.com;
# ends in slash
location ~ /$ {
root /var/www/example.com;
try_files $uri/index.html =404;
}
@qguv
qguv / example.com.conf
Created Jul 29, 2020
nginx host static files, add trailing slash when using implicit index.html, preserve anchors and queries
View example.com.conf
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name example.com;
# ends in slash
location ~ ^([^#?]*/)([#?].*)?$ {
root /var/www/example.com;
try_files $1/index.html =404;
}
@qguv
qguv / install_bubbleupnp.sh
Last active Mar 11, 2021
Install BubbleUPnP on CoreELEC/LibreELEC/OpenELEC
View install_bubbleupnp.sh
#!/bin/sh
set -e
jre_url='https://cdn.azul.com/zulu-embedded/bin/zulu8.46.0.225-ca-jdk8.0.252-linux_aarch32hf.tar.gz'
jre_sha1sum=ac884e478a58db9aa3c109d2d43b819504ba6969
jre_dest=/storage
bubbleupnp_url='https://bubblesoftapps.com/bubbleupnpserver/BubbleUPnPServer-distrib.zip'
bubbleupnp_sha1sum=ac87fe841b407413c35b1bfe06ee572fbe1c81d8
bubbleupnp_dest=/storage/bubbleupnp
@qguv
qguv / Makefile
Created Jun 26, 2020
Makefile for ras52/bootstrap (WIP)
View Makefile
.DEFAULT_GOAL := stage-3/ld
ELF_BIN := stage-1/elfify
BIN := stage-1/unhexl stage-2/as stage-3/ld stage-3/test1 stage-3/test2 stage-3/test3
stage-0/_unhex: stage-0/unhex.x
$(info #1)
printf $$(printf '\\x%s' $$(<$<)) >$@
chmod u+x $@
@qguv
qguv / onpremise-proxy-test.sh
Last active Jun 29, 2020
Prepare LXD container which can only access the internet through an http proxy (uses tinyproxy and firewalld). Written for Fedora 31, but will probably work elsewhere too.
View onpremise-proxy-test.sh
#!/bin/bash
set -e
create_container="${create_container:-true}"
lxd_bridge="${lxd_bridge:-lxdbr0}"
container_image="${container_image:-images:debian/8/amd64}"
container_name="${container_name:-onpremise-proxy-test}"
tinyproxy_conf="${tinyproxy_conf:-/etc/tinyproxy/tinyproxy.conf}"
sudo_conf="${sudo_conf:-/etc/sudoers.d/client}"
apt_conf="${apt_conf:-/etc/apt/apt.conf.d/proxy.conf}"
@qguv
qguv / THIN
Last active Dec 13, 2020
hackerhotel clue
View THIN
Tm8sIG5vLCBubywgdGhhdCB3b3VsZCBiZSB0b28gZWFzeSwgaGF2ZSB5b3UgcmVhZCB0aGUgbm90ZSBpbiByb29tIDIwMz8KCgoK TSTCTKCTL1KSOTBBJEzCRUCULzBEU0NDJFdQVKCJLjBBUiTVSWVgKF9UJVwkJEBWVSqZL1VgN0WSJTBMTEMhT05EXSTQTcVgN0iPAFNHWUpFIWiFLGAyUUMvIWGOJDBRU1UCSEdFLUCJAFFFJFFQIWeMIVQyXU9NJEFCTMVgNFhBVyTHQNJuAFkyRU0yT0VIWCTJT1FVQMeFUllGJFJJRKCNIWNMSVAhQ0zCTMKFMj4gOV9VAF5FJVQyWE8yWENNTUCSITBMTEMLTcGNJTBHSiTOWKCBJGZXVlFCUdlgIV5EAFhXJFvKTWxgK05QVqCXKFFMJFJQIWSPDhpBJEzCVcVgKFlWSENPIXSIJTBGRU1XJEdPIXSIJTBGU05PJ1KBLRoCWU5YU1JMWU5TWENNWKCSITBARVEhQcWFLjBNUkJGUaCBAGNISUpNIWGOJDBVRU4CUk9MJEzGTXBgNWMyWU5MTUohVWiFAGNISUpNIWmTAFJKU0tXUiTDWKCUN08hUcWBLFxRDkzQVUCTNV1NJWJLMiTUTqCXJTBGSUNFIWFgLFlMWEpGIW1QUcVgMFFMTUNPQ0MvCyqCNWQyV09PLj4uDjBLU09OAFkyW0lEUCTDRKCGMlVXMi4mJEXPRUCZL1VgNF9PAR=