Skip to content

Instantly share code, notes, and snippets.

Avatar
🌟
Have a star!

Paul solarkraft

🌟
Have a star!
View GitHub Profile
@solarkraft
solarkraft / declutter-outlook.user.css
Last active January 13, 2023 20:09
Remove all the unnecessary junk from the Outlook Web App and polish it a little
View declutter-outlook.user.css
/* ==UserStyle==
@name Declutter Outlook
@namespace https://github.com/solarkraft
@version 1.0.2
@description Remove all the unnecessary junk from the Outlook Web App and polish it a little
@author solarkraft
==/UserStyle== */
@-moz-document domain("outlook.office.com") {
#app > div > div:nth-child(2) {
View keybindings.json
[
// Quickly run tasks
{
"key": "cmd+r",
"command": "workbench.action.tasks.reRunTask"
},
{
"key": "shift+cmd+r",
"command": "workbench.action.tasks.runTask"
},
@solarkraft
solarkraft / syncthing-automerge.py
Created December 30, 2022 18:00
Monitors a Syncthing-synced directory and tries to merge conflicting files (based on https://www.rafa.ee/articles/resolve-syncthing-conflicts-using-three-way-merge/). Probably adaptable for other directory types, but only tested with Logseq (works for me™️).
View syncthing-automerge.py
import os
import time
import re
import subprocess
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
def get_relative_path(path):
return os.path.relpath(path)
@solarkraft
solarkraft / shut_up_mac.sh
Last active December 22, 2022 01:32
Continually delete meta-files Finder keeps creating on external drives
View shut_up_mac.sh
#!/usr/bin/env bash
path=$1
check() {
file=$1
echo "Checking $file"
# Anything matching /._*
if [[ $file =~ \/\._. ]] || [[ $file =~ \/\.DS_Store ]]; then
echo "Shut up $file"
@solarkraft
solarkraft / micropython-webrepl-cli.py
Last active December 20, 2022 06:40
(Simple) MicroPython WebREPL CLI to work around newline issues
View micropython-webrepl-cli.py
#!/usr/bin/env python
import sys
import tty
import termios
import asyncio
import websockets
uri = "ws://192.168.2.69:8266"
password = ""
@solarkraft
solarkraft / tasks.json
Last active November 11, 2022 02:40
VSCode: Run current file/selected text
View tasks.json
{
// You can bind "Rerun Last Task" to something convenient like cmd+R
"version": "2.0.0",
"tasks": [
{
"label": "Run current file",
"type": "shell",
"command": "echo Running from file: \"$(cat ${file})\"",
},
{
View .prettierrc
{
"useTabs": true,
"tabWidth": 4,
"semi": false,
"printWidth": 120
}
View Tidal.user.js
// ==UserScript==
// @name Tidal declutterer
// @namespace http://tampermonkey.net/
// @version 0.7
// @description Gives the Tidal web app some nice visual tweaks and hides non-personalized recommendations (ads). User configurable.
// @author solarkraft@mailbox.org
// @match https://listen.tidal.com/*
// ==/UserScript==
// The app is made with react and it would be preferable to directly hook into that to
@solarkraft
solarkraft / index.html
Last active April 28, 2022 23:47
Decoupling Logeq's published web app from its content
View index.html
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<link href="static/css/style.css" rel="stylesheet" type="text/css" />
<!-- By far the least important -->
<!-- <link href="static/css/tabler-icons.min.css" rel="stylesheet" type="text/css" /> -->
<link href="custom.css" rel="stylesheet" type="text/css" />
View mailbox-declutter.js
// ==UserScript==
// @name Decluttered mailbox.org
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Make io.ox (mailbox.org's webmailer) a bit nicer on the eyes
// @author solarkraft@mailbox.org
// @match https://office.mailbox.org/*
// @match https://webmail.strato.de/appsuite/*
// ==/UserScript==