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
// Wrapper for windows subsystem for linux (Bash on Ubuntu on Windows) | |
// It allows running native ubuntu applications from Windows | |
// 1. Compile (on windows, the command below is for mingw-gcc): | |
// g++ -O3 -flto -fwhole-program -fvisibility=hidden -fno-exceptions -fno-rtti -s win2lin.cpp -o win2lin.exe | |
// 2. make a copy for each program | |
// for i in git python perl; do cp win2lin.exe ${i}.exe; done | |
// 3. put directory with exes in windows PATH | |
// 4. example (from cmd.exe): | |
// cat "c:\test 1.txt" | |
// will be translated to: bash -c "exec cat \"/mnt/c/test 1.txt\"" |
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
CFLAGS ?= -O3 -flto | |
simple_uinput: proto.h spnav_config.h spnav.h proto.c spnav.c simple.c | |
$(CC) $(CFLAGS) -o $@ $^ | |
spnav_config.h: | |
touch $@ | |
proto.h spnav.h proto.c spnav.c: | |
curl -L -O --compressed --url "https://github.com/FreeSpacenav/libspnav/raw/master/src/{proto.c,proto.h,spnav.c,spnav.h}" |
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
# To generate mitm cert and key: | |
# openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -passout pass:"third-wheel" -subj "/C=US/ST=private/L=province/O=city/CN=hostname.example.com" | |
# see: https://github.com/campbellC/third-wheel | |
[package] | |
name = "http-ytproxy" | |
version = "0.1.0" | |
edition = "2021" | |
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== | |
-- @name mpv-playlist-kdialog | |
-- @version 0.1 | |
-- @description Display mpv playlist and select playlist entry in KDE's kdialog or Gnome's zenity. | |
-- @author ftk | |
-- @license 0BSD | |
-- @downloadURL https://gist.githubusercontent.com/ftk/5e26656a2ec9a6cb0fef46918f741d0a/raw/mpv-playlist-kdialog.lua | |
-- ==/UserScript== | |
local options = { | |
-- window dimensions |
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 | |
# check for one-time codes coming as notifications via KDE connect and copy them to clipboard | |
# requirements: qdbus(qt-tools), dbus-monitor, kde-connect, klipper | |
# the script must be run in user session | |
set -euo pipefail | |
shopt -s lastpipe | |
if [[ $# -eq 0 ]] | |
then |