This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
M83 ; set to relative | |
G1 E-6 F900 ; retract 6mm at 15mm/sec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Options for libcamera based cameras (PiCam, Arducam, ...) | |
# The port on which the webcam server for the camera should listen on. If you have only | |
# one camera, leave at 8080. If you have more, change to 8081, 8082, etc. The primary | |
# camera will be considered the one with 8080. | |
PORT=8080 | |
WIDTH=1640 | |
HEIGHT=1232 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hide "Suggested post" on Facebook | |
// @include https://www.facebook.com/* | |
// @grant none | |
// ==/UserScript== | |
(function(){ | |
var watcher = function(){ | |
var bs=[...document.querySelectorAll('div[role="main"] div[data-pagelet="FeedUnit_{n}"]')].filter(div => div.innerHTML.includes('Suggested for you')).forEach(el => el.remove()) | |
setTimeout(watcher, 200); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo | |
bar | |
baz | |
qux | |
quux | |
corge | |
grault | |
garply | |
waldo | |
fred |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAKEFILE_PATH := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) # Keep at top of file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git describe --tags --exact-match 2> /dev/null \ | |
|| git symbolic-ref -q --short HEAD \ | |
|| git rev-parse --short HEAD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ensures the shell meets some minimum version, useful when using bash features introduced after a certain release | |
check_version() { | |
local reqMajor="$1" | |
local reqMinor="$2" | |
local major minor | |
IFS=. read -r major minor _ <<< "$BASH_VERSION" | |
if (( major < reqMajor )) || (( major == reqMajor && minor < reqMinor)); then | |
echo "Bash version $reqMajor.$reqMinor or greater required, found $major.$minor" >&2 | |
return 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Creates/joins a shared session using session groups (-t option). | |
# This simplifies making a shared group. Just invoke tmuxx from anywhere | |
# and it'll always join to the same, shared session. | |
# | |
# Parameters: | |
# $1 the name of the session group, defaults to 'main' | |
tmuxx () { | |
local session="${1:-main}" | |
tmux new-session -t "$session" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Searches for a named argument in the form of "key=value". | |
# Returns the value associated with the key. | |
# | |
get_named_arg() { | |
local key="$1" | |
local default="${2:-}" | |
shift 2 | |
for pair in "$@"; do | |
if [[ $pair =~ ^([^=]+)=([^=]*)$ ]] && [[ ${BASH_REMATCH[1]} == "$key" ]]; then | |
printf %s "${BASH_REMATCH[2]}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From https://stackoverflow.com/questions/3338030/multiple-bash-traps-for-the-same-signal | |
# note: printf is used instead of echo to avoid backslash | |
# processing and to properly handle values that begin with a '-'. | |
log() { printf '%s\n' "$*"; } | |
error() { log "ERROR: $*" >&2; } | |
fatal() { error "$@"; exit 1; } | |
# appends a command to a trap | |
# |
NewerOlder