List of "cards" from Oblique Strategies
(Stolen from David Wicks, who didn't specify any source license)
- Turn it over.
- Switch the axes.
- Think about color.
- Make it black and white.
- Use the tangents.
#!/bin/sh | |
# This script tries to automatically switch to a plugged in monitor | |
# and handles any quirks or issues while doing so. | |
# Stores current desktop (bspwm switches to some other empty desktop after switch) | |
desk=$(bspc wm -d | jq ".monitors[].focusedDesktopId") | |
# Switch active monitor | |
if xrandr -q | grep -q "HDMI-2 connected"; then |
COVER := ".cover" | |
TARGETS := "$(go list ./... | grep -v /tmp)" | |
# Touch go.mod in any dirs you want to "exclude" from go mod tidy, | |
# for example inside tmp. | |
# Show available recipes by default | |
default: | |
@just --list | |
# Run tests and log the test coverage |
#!/bin/sh | |
set -e pipefail | |
# Converts all CBR files in current dir to CBZ | |
# Source: | |
# https://ubuntuforums.org/showthread.php?t=1273762&s=a388d691ed1d259329dc26304528a056&p=8676006#post8676006 | |
convert() { | |
dir=$(pwd) | |
cbr="$1" |
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
"strings" | |
"time" | |
) |
(Stolen from David Wicks, who didn't specify any source license)
#!/bin/sh | |
# Script to reject anything but rsync through ssh. | |
# Source: https://troy.jdmz.net/rsync/index.html | |
# | |
# To force run it on new ssh connections, add: | |
# command="/home/USER/force_rsync.sh" | |
# to /home/USER/.ssh/authorized_keys, at the start | |
# of the key line of enforced user. |
#!/bin/sh | |
# Heavily based on https://github.com/thameera/vimv, | |
# but ported to POSIX sh with misc. improvements | |
# and simplifications. | |
set -eu | |
panic() { | |
echo "ERROR: $1" >&2 |
List of HTTP headers for increased security.
// Copyright © 2021 Alex | |
// This Source Code Form is subject to the terms of the Mozilla Public | |
// License, v. 2.0. If a copy of the MPL was not distributed with this | |
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
package internal | |
import ( | |
"time" | |
"unicode" |
package main | |
import ( | |
"errors" | |
"fmt" | |
"os" | |
"path/filepath" | |
) | |
// . or tmp/ = current working dir |