Skip to content

Instantly share code, notes, and snippets.

@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
}
@Ircama
Ircama / PT-P300BT.md
Last active June 1, 2024 08:31
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

@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"
],
@geovannimp
geovannimp / cSpell_packageJson_dictionary.md
Last active May 8, 2024 23:21
cSpell package.json dictionary

cSpell package.json dictionary with monorepo support

Create the following files in the .vscode folder of your repo

.vscode/cspell.json

{
  "import": ["./cspell-node.config.cjs"]
}

.vscode/cspell-node.config.cjs