Skip to content

Instantly share code, notes, and snippets.

View lovelaced's full-sized avatar
🔌
plugged in

e.g. magical unicorn lovelaced

🔌
plugged in
View GitHub Profile
[options]
font=Profont 8
[colors]
cursor =#b9b9b9
foreground =#b9b9b9
background =rgba(16,16,16,.8)
color0 =#101010
color1 =#7c7c7c
@lovelaced
lovelaced / arch-linux-install
Created December 5, 2015 19:50 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
stations=(
["wzbc"]="http://amber.streamguys.com:4860/listen.pls"
["wxrw"]="http://108.163.232.21:8080/;stream.nsv"
["wxjm"]="http://media.wmra.org:8000/wxjm"
["wutt"]="http://wutt.ut.edu:8000/wutt_high_quality.m3u"
["wuog"]="http://wuogfm.serverroom.net:9076/;stream.mp3"
["wumm"]="http://wumm.machias.edu:9000/wumm"
["wuml"]="http://108.163.223.242:8133/;stream.mp3"
["wrbb"]="http://129.10.160.50:8000"

Keybase proof

I hereby claim:

  • I am lovelaced on github.
  • I am valka (https://keybase.io/valka) on keybase.
  • I have a public key ASDQY41Yxoh__1AOC6PL5LmT-cIpBFRnEjdHn0vZGVxPoAo

To claim this, I am signing this object:

@lovelaced
lovelaced / ff_last_accessed.sh
Created July 17, 2018 22:29
get the URL of the last accessed (most recently loaded?) loaded tab in firefox
export opentabs=$(find ~/.mozilla/firefox*/*.default/sessionstore-backups/recovery.jsonlz4);
python3 <<< $'import os, json, lz4.block
f = open(os.environ["opentabs"], "rb")
magic = f.read(8)
jdata = json.loads(lz4.block.decompress(f.read()).decode("utf-8"))
f.close()
last_recent = 0
for win in jdata.get("windows"):
for tab in win.get("tabs"):
@lovelaced
lovelaced / README.md
Last active August 31, 2019 13:48
apps/freeside/

All you need to do is create an image in GIMP which is 160x80 (the Freeside logo is exactly these dimensions when scaled down).

Export this image in RAW format with type BMP.

Add whatever you want to the image and the clock will appear in the top right and the "invisible" battery marker will be in the top right - it will turn black when semi-low and red when low.

Watch time can be set by pressing top right button (may need a long press if it doesn't work right away).

#!/bin/bash
# Adjust homserver, room, and accesstoken to your particular setup
msgtype=m.text
homeserver="$2"
room="$3"
accesstoken="$4"
while true; do
@lovelaced
lovelaced / matrix_login.sh
Last active June 15, 2020 20:35
Logging into matrix via curl
#!/bin/bash
MATRIX_SERVER="$2"
USER="$3"
PASSWORD="$4"
curl -XGET "https://$MATRIX_SERVER/_matrix/client/r0/login"
curl -XPOST -d '{"type":"m.login.password", "user":"$USER", "password":"$PASSWORD}' "https://$MATRIX_SERVER/_matrix/client/r0/login"
{
"version": "2.0",
"columns": 2,
"tiles": [
{"type": "PORT", "label": "Am I on fire?", "params": {"hostname": "127.0.0.1", "port": 8080}},
{"type": "HTTP-STATUS", "label": "SSL certificate is valid", "params": { "url": "https://banmebit.ch" }},
{
"type": "PING",
"label": "Localhost",
"params": { "hostname": "127.0.0.1" }