Skip to content

Instantly share code, notes, and snippets.

@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"
],
@Ircama
Ircama / PT-P300BT.md
Last active March 26, 2024 08:55
Print to Brother PTP300BT from a computer

Printing to a Brother P-Touch Cube PT-P300BT label printer from a computer

Introduction

The Brother P-touch Cube PT-P300BT labelling machine is intended to be controlled from the official Brother P-touch Design&Print 2 app for Android and iOS devices, instead of from a computer.

This Gist provides small code revision and some additional scripts to the dogtopus/Pipfile one, which in turn is forked from the excellent stecman one, in order to print text labels via scripts on computers with different O.S. or subsystems.

The scripts are used to convert text labels to appropriate images compatible with 12mm width craft tapes like [TZe-131

@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
}
@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>
@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 }
]
@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 {{{
@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);
}
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active April 30, 2024 17:02
Hyperlinks in Terminal Emulators
@cryzed
cryzed / fix-infinality.md
Last active April 30, 2024 22:01
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@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