This file contains 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
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')" | |
# syntax = docker/dockerfile:1.4.0 | |
FROM node:20 | |
WORKDIR /root | |
RUN npm install sqlite3 |
A simple "1-click" javascript approach to downloading a scanned book from archive.org to read at your leisure on the device of your choosing w/out having to manually screenshot every pages of the book by hand. In short it's a glorified "Save Image As..." approach but consolidated down to "1 click". BTW there may be a much better option than this out there - I just built this as an autistic project to see if it would work.
By using this script you agree to delete all book files/images after your 1 hour or 14 days is up! I don't support using this script for any other use cases. After all, none of us have ever kept a library book past it's return date, right?
This file contains 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
#!/bin/bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
target="${1:-/opt/sublime_merge/sublime_merge}" | |
check_sha() { | |
local sha_valid |
This file contains 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
#!/data/data/com.termux/files/usr/bin/bash | |
if [ -z "${1:-}" ]; then | |
exit 1 | |
fi | |
url_is_supported() { | |
REPLY="" | |
declare -A arr | |
case "$1" in |
This file contains 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
class E(BaseException): | |
def __new__(cls, *args, **kwargs): | |
return cls | |
def a(): yield | |
a().throw(E) |
- Install the USB drivers for your device (Google has a list of some universal USB drivers here)
- Download the ADB binary for your particular OS (Windows, Mac, Linux)
- Extract the zip file into a folder that you can quickly access.
- On your phone, go to Settings and tap on About Phone. Find the Build Number and tap on it 7 times to enable Developer Options.
- Now enter Developer Options and find USB Debugging. Enable it.
- On your computer, browse to the directory where you extracted the ADB binary.
- Launch a Command Prompt in your ADB folder. For Windows users, this can be done by holding Shift and Right-clicking then selecting the “open command prompt here” option.
- Once you’re in the command
This file contains 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
# dvorak layout | |
loadkeys dvorak | |
export HOSTNAME=thinkpad | |
export DEVICE=/dev/sda | |
export EFI_PARTITION=/dev/sda1 | |
export ROOT_PARTITION=/dev/sda2 | |
# as root | |
timedatectl set-ntp true |
Last login: Sat Jun 15 15:49:42 on ttys000
▶ [~] set -x > a.txt
+omz_termsupport_precmd:1> emulate -L zsh
+omz_termsupport_precmd:3> [[ '' == true ]]
+omz_termsupport_precmd:7> title '%15<..<%~%<<' %n@%m
+title:1> emulate -L zsh
+title:2> setopt prompt_subst
+title:4> [[ '' == *term* ]]
NewerOlder