This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @run-at document-body | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const darkModeCSS = ` | |
html { | |
filter: invert(90%) hue-rotate(180deg) !important; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
USERS_DIR="/home" | |
SERVICES_DIR="/etc/sv" | |
RUNIT_DIR="/var/service" | |
create_tmux_service() { | |
user="$1" | |
service_name="tmux-${user}" | |
service_dir="${SERVICES_DIR}/${service_name}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import plotext as plt | |
from subprocess import check_output | |
import psutil | |
import time | |
import math | |
CMD = "sensors amdgpu-pci-0500 | grep PPT | grep -oP '(?<=cap =) *(.?\d+)'" | |
TARGET_TEMP_MAX = 91 | |
TARGET_TEMP_MIN = 87 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import plotext as plt | |
from subprocess import check_output | |
import psutil | |
import time | |
CMD = "sensors amdgpu-pci-0500 | grep PPT | grep -oP '(?<=cap =) *(.?\d+)'" | |
TARGET_TEMP = 83 | |
CRITICAL_TEMP = 92 | |
CAP_MIN = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Example: echo "Hello" | send.sh | |
# | |
message=$( cat ) | |
apiToken=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11 | |
chatId=354339153 # Reciever ID | |
send() { | |
curl -s \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export FZF_DEFAULT_OPTS="--reverse --info inline --no-clear" | |
export data=$(dirname $(realpath $0))/data | |
export list=/tmp/facts-list | |
export query=/tmp/facts-query | |
function xe() { | |
while read tmp; do | |
echo "$tmp" | xargs -n 1 -I [] bash -c "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
expireTime="3200" | |
mpddir="$HOME/Music/" | |
defaultimage="$HOME/music.png" | |
update_cover() { | |
path=$mpddir$(mpc -f %file% current) | |
album=$(mpc -f %file% current) | |
ffmpeg -loglevel quiet -y -i "$path" /tmp/cover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mpc -f "[[%artist% - ][%album% - ]%title%]|[%file%]" playlist | \ | |
cat -n | sed "s/\t/: /" | \ | |
cut -c 1-120 | dmenu -i | cut -d ':' -f 1 \ | |
| xargs -r mpc play > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# btrfs-undelete | |
# Copyright (C) 2013 Jörg Walter <[email protected]> | |
# This program is free software; you can redistribute it and/or modify it under | |
# the term of the GNU General Public License as published by the Free Software | |
# Foundation; either version 2 of the License, or any later version. | |
if [ ! -b "$1" -o -z "$2" -o -z "$3" ]; then | |
echo "Usage: $0 <dev> <file/dir> <dest>" 1>&2 | |
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sets, strutils | |
if paramCount() != 2: | |
echo "mydiff file1 file2" | |
quit() | |
let file1 = open(paramStr(1)) | |
let file2 = open(paramStr(2)) | |
let old_lines = file1.readAll().splitLines() |