Skip to content

Instantly share code, notes, and snippets.

@THOUSAND-SKY
THOUSAND-SKY / jkscroll.user.js
Created December 1, 2022 12:10
j/k scrolling in firefox
// ==UserScript==
// @name scrolling
// @match *://*/*
// @version 1.0
// ==/UserScript==
const s = (e, dir) => {
e.preventDefault()
e.stopPropagation()
window.scrollBy({
behavior: "smooth",
@THOUSAND-SKY
THOUSAND-SKY / slack-always-online.user.js
Created April 25, 2023 01:03
Slack: Always Active user script
// ==UserScript==
// @name Slack: Always Stay Active -- slight update from version available in below url
// @namespace https://ericdraken.com/slack-always-stay-active
// @version 1.0.2
// @description Always stay active on Slack.
// @author Eric Draken (ericdraken.com)
// @match https://app.slack.com/client/*
// @grant unsafeWindow
// @run-at document-start
// ==/UserScript==
@THOUSAND-SKY
THOUSAND-SKY / ezdrop.sh
Created February 13, 2024 20:11
Copy a file from CLI on X11, and paste it into other GUI apps
#!/bin/bash
# Usage: ezdrop myfile.png
# ^ ctrl+v into browser (discord/slack/whatever)
f="$(realpath "$@")"
echo -n "file://$f" | xclip -se c -t 'text/uri-list'
@THOUSAND-SKY
THOUSAND-SKY / record.sh
Last active February 14, 2024 00:37
X11 screencast area->clipboard snippet
#!/usr/bin/env bash
if pgrep -f "ffmpeg.*\/tmp\/screencast\.webm"
then
pkill -f "ffmpeg.*\/tmp\/screencast\.webm"
exit
fi
rm /tmp/screencast.webm
rm /tmp/screencast.webp