Skip to content

Instantly share code, notes, and snippets.

clear lock
clear control
clear mod1
clear mod2
clear mod3
clear mod4
clear mod5
keycode 37 = Hyper_L
keycode 66 = Control_L
add control = Control_L Control_R
@EnigmaCurry
EnigmaCurry / mysql-volume-backup.md
Last active November 10, 2023 10:50
Physical backup and restore of MySQL data in a docker volume

Physical backup and restore of MySQL data in a docker volume

Backup

  • Login to mysql shell for the container named mysql:
docker run --rm -it --link mysql:mysql mysql:5 mysql -h mysql -u root
@EnigmaCurry
EnigmaCurry / 0_psychedelic_serverless_art.sh
Last active September 8, 2018 01:39
Serverless Psychedelic Art
#!/bin/sh
gcloud beta functions deploy psychedelic_art --runtime python37 --trigger-http
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EnigmaCurry
EnigmaCurry / esnextbin.md
Created April 16, 2017 17:16
esnextbin sketch
@EnigmaCurry
EnigmaCurry / esnextbin.md
Last active March 14, 2017 18:23
esnextbin sketch
@EnigmaCurry
EnigmaCurry / archive_podcast.py
Last active March 9, 2020 15:51
Basic podcast archiving script
"""Convert podcast feeds into an aria2 download script
- Setup feed output directories and URLS
- Run: python archive_podcast.py > aria2.txt
- Run: aria2c -i aria2.txt
Aria2 will download all the episodes and supports resuming of partial downloads
"""
import feedparser
#!/bin/bash
# GPG verified sandstorm installer for curlbombing.
# Use with "curlbomb --unwrapped -1 run sandstorm.curlbomb.sh"
# The idea here is that you trust the sandstorm devs, but you don't
# trust their installer script without verifying the signatures, but
# you want it to be completely automated so you can run this over and
# over.
@EnigmaCurry
EnigmaCurry / vpn_namespace.md
Created April 7, 2016 02:28
OpenVPN and browser specific network routing with ip netns

OpenVPN and browser specific network routing with ip netns

Create network bridge

A network bridge allows us to have a virtual router that we can plug multiple network interfaces into. The IP address is assigned to the bridge rather than the individual network interface.

Create the bridge device, br0 :

@EnigmaCurry
EnigmaCurry / gist:35d6f36411057e6c6c4107a7175b7186
Created March 31, 2016 23:48
bash source command doesn't like to be hooked up to pipes
$ echo "export IAMSET=yes" > test.sh
$ source test.sh | tee
$ echo "IAMSET="$IAMSET
IAMSET=
$ source test.sh
$ echo "IAMSET="$IAMSET
IAMSET=yes