Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of
@tvdstaaij
tvdstaaij / PKGBUILD.patch
Created September 2, 2016 14:23
Arch Linux ibus-mozc-ut patch for kana as default input mode
--- PKGBUILD.orig 2016-09-02 14:28:07.722064884 +0200
+++ PKGBUILD.new 2016-09-02 14:30:38.228733627 +0200
@@ -138,6 +138,9 @@
cd "${srcdir}/mozc/"
+ # https://github.com/google/mozc/issues/381#issuecomment-242965044
+ sed -i 's/const bool kActivatedOnLaunch = false/const bool kActivatedOnLaunch = true/' src/unix/ibus/property_handler.cc
+
git submodule update --init --recursive
@sahmeepee
sahmeepee / launch.json
Created June 20, 2021 18:05
VSCode setup for Playwright Test Runner - allows debug of current file
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch all tests 3 browsers",
"request": "launch",
"runtimeArgs": [
"run-script",
"tests3x"
],
@RIAEvangelist
RIAEvangelist / Install Cloud9 on local or remote computer, server, or raspberry pi
Last active June 6, 2023 03:37
This gist will help you install Cloud9 on your local or remote computer, server, or even your raspberry pi. Many people are having issues at the time of this Gist's creation.
Complete installation process:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y python-software-properties python make build-essential g++ curl libssl-dev apache2-utils git libxml2-dev
sudo apt-get update
sudo apt-get upgrade
cd ~
mkdir git
cd ~/git
@cedws
cedws / defer.sh
Last active June 23, 2023 13:26
Go-like defer 'keyword' for shell
#!/bin/sh
DEFER=
defer() {
DEFER="$*; ${DEFER}"
trap "{ $DEFER }" EXIT
}
@derjohn
derjohn / daemon.json
Last active July 13, 2023 14:25
Docker Config with IP address range that does not collide with the Wifi of Deutsche Bahn DB
/etc/docker/daemon.json
{
"bip" : "172.70.0.1/16",
"fixed-cidr" : "172.70.16.0/20",
"log-level" : "info",
"default-address-pools" : [
{"base" : "172.80.0.0/16", "size" : 24 },
{"base" : "172.90.0.0/16", "size" : 24 }
]
@mrkwatz
mrkwatz / Firefox_Scrollbars-W10style.md
Last active August 5, 2023 03:18
Firefox 57 Windows 10 UWP Style Overlay Scrollbars

As far as I am aware the time has come and as of Firefox 72 XUL has been stripped from firefox and so the method used to inject this scrollbar theme is no longer supported -- reference the following for future scroll themes:

Mozilla is currently working to phase out the APIs used to make this theme work. I will try to maintain each version until that time but eventually there will be no workaround. When that time comes there is a new, but more limited api for applying simple themes to scrollbars. In nightly I am currently using the following userContent.css

:root{
	scrollbar-width: thin;
	scrollbar-color: rgb(82, 82, 82) rgb(31, 31, 31);
}
@ongun-kanat
ongun-kanat / 00-overrides.conf
Last active April 11, 2024 13:12
Make ~~cancer~~ emoji work on Linux
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>Arial</family>
<prefer>
<family>Arial</family>
<family>Liberation Sans</family>
<family>sans-serif</family>
</prefer>
@drye
drye / Irssi Screen Startup.md
Last active April 12, 2024 10:38
Start Irssi with Screen on startup on Arch Linux on Raspberry PI

Start Irssi with Screen on startup on Arch Linux on Raspberry PI

Put this in the file /etc/systemd/system/irssiscreen@.service

[Unit]
Description=irssiscreen
After=network.target
@rpigott
rpigott / _swaymsg
Last active April 28, 2024 13:39
swaymsg zsh completions w/ sway command completion
#compdef swaymsg
typeset -A opt_args
__swaymsg() {
# Reuse socket path from command line if present
swaymsg ${(kv)opt_args[(I)-s|--socket]} "$@" 2>/dev/null
}
# _sway
# sway ipc {{{