Skip to content

Instantly share code, notes, and snippets.

@doyousketch2
doyousketch2 / github.css
Created December 9, 2020 02:39
GitHub Stylus dim mode
@-moz-document domain("github.com") {
/* header */
main > div:first-of-type { background-color: #999 !important }
/* usually just side column, but sometimes full-page, such as wiki */
body { background-color: #bbb !important }
button[aria-label^="Edit the file"] { background-color: #ff9955 !important }
button[aria-label^="Delete the file"] { background-color: #ff3366 !important }
@doyousketch2
doyousketch2 / stackoverflow.css
Created November 14, 2020 17:01
Stylus CSS for StackOverflow
@-moz-document domain("stackoverflow.com") {
:root {
--pro: #258;
--con: #512;
}
div.user-info { background: #222 !important }
div.owner { background: #000 !important }
/* pros */
@doyousketch2
doyousketch2 / twitter.css
Last active September 30, 2020 21:12
Reduce Twitter clutter
@-moz-document domain("twitter.com") {
div[role='group'] > div:nth-child(4) { display: none !important }
div[role='group'] > div:nth-child(5) > div > div > img { background-color: rgb(0, 60, 90) !important }
a[aria-label="Home"] { display: none !important }
a[aria-label="Home (New unread Tweets)"] { display: none !important }
a[aria-label="Search and explore"] { display: none !important }
a[aria-label="Notifications"] { background-color: rgb(11, 22, 33) !important }
a[aria-label="Direct Messages"] { background-color: rgb(11, 22, 33) !important }
@doyousketch2
doyousketch2 / keepalive.sh
Last active March 11, 2020 23:14
KeepAlive for Terminal session
#! /bin/bash
active=true
while $active
do
window_id=`xdotool search --title "Terminal"`
if [ $window_id ] ; then
xdotool windowactivate $window_id
xdotool type clear
@doyousketch2
doyousketch2 / freetype-config.pseudocode
Created November 5, 2019 08:05
freetype-config > pkg-config wrapper
if freetype-config --cflags
then pkg-config --cflags freetype2
if freetype-config --libs
then pkg-config --libs freetype2
if freetype-config --ftversion
then apt-cache show libfreetype6 | grep -e 'Version:*' | sed 's/Version: //' | sed 's/-[0-9]//'
@doyousketch2
doyousketch2 / noteblock.lua
Created September 13, 2019 23:55
Updates Minetest Digistuff Noteblock
if not minetest.get_modpath("mesecons_noteblock") then
minetest.log("error","mesecons_noteblock is not installed - digilines noteblock will not be available!")
return
end
local validnbsounds = dofile(minetest.get_modpath(minetest.get_current_modname())..DIR_DELIM.."nbsounds.lua")
minetest.register_node("digistuff:noteblock", {
description = "Digilines Noteblock",
groups = {cracky=3},
on_construct = function(pos)
@doyousketch2
doyousketch2 / gedit-lua
Created September 5, 2019 02:24
Run your Lua / Love2D scripts within gEdit -- F5
#! /bin/dash
# [Gedit Tool]
# Name=Run Lua / Love2D
# Languages=lua
# Shortcut=F5
# Input=nothing
# Output=output-panel
# Applicability=local
# Save-files=document
@doyousketch2
doyousketch2 / stringSplit.Lua
Last active September 2, 2019 21:37
stringSplit.Lua
-- modification of String split by luk3yx
-- https://gitlab.com/snippets/1756106
string.split = function(str, chr)
local s, e = str:find(chr)
local r = {}
local i = 1
while s do
r[#r + 1] = str:sub(i, s - 1)
i = e
@doyousketch2
doyousketch2 / firefox-clear-weekly-history.sh
Last active July 29, 2019 20:20
Delete Firefox history older than 1 week - in Debian Linux - https://git.io/fjSWS
#! /bin/bash
## sudo apt update && sudo apt install sqlite3
## if you're on the Default-channel
cd ~/.mozilla/firefox/**.default/
sqlite3 places.sqlite "delete from moz_historyvisits where visit_date < strftime('%s', 'now', '-7 days') * 1000000;"
sqlite3 places.sqlite "delete from moz_places where url like '%duckduckgo%'; vacuum;"
@doyousketch2
doyousketch2 / README.txt
Last active July 22, 2019 21:30
Simple IRC Chat Bot for HexChat
https://git.io/fjDe4