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 | |
# Shokz OpenSwim headphones (formerly AfterShokz Xtrainerz) have a bug where | |
# tracks are not played in alphabetical or track order. They are played in the | |
# order that they were copied to the device. Read more about the issue here: | |
# | |
# - https://en.help.shokz.com/s/article/How-to-list-the-track-order-on-OpenSwim-formerly-Xtrainerz-OPENSWIM1408 | |
# - https://en.help.shokz.com/s/get-article?urlName=how-to-list-tracks-order-EN | |
# | |
# After extensive testing, it seems that specifying transmission order alone is |
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
.container | |
- for i in 1..3 | |
.shaker | |
ul.group | |
- for j in 1..14 | |
li.line |
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
# Move the results into their own folder, drag that parent folder into imageOptim, `cd` into it, then: | |
for d in Issue\ */; do | |
cd "$d" | |
convert -compress jpeg -quality 33 -resize 2388x2388\> *.jpg "../${d%/}.pdf" | |
cd .. | |
done |
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 | |
# Default values | |
start_time=0 | |
rtl_flag=false | |
output_file="output.png" | |
downscaling_factor=1 | |
aspect_ratio="16:9" | |
# Parse arguments |
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 | |
# Define the source and target directories. | |
SOURCE_DIR="./originals" | |
TARGET_DIR="./processed" | |
# Ensure ffmpeg is installed. | |
if ! command -v ffmpeg &> /dev/null | |
then | |
echo "ffmpeg could not be found, please install it." |
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 | |
for d in */; do | |
cd "$d" | |
title=$(echo "$d" | sed 's/\./ /' | sed 's/ \[.*//g') | |
echo "$title" | sed 's/FABRICLIVE/Fabric lyve/' | sed -r 's/\(([0-9]+)\)/in \1/g' | sed -r 's/ 0+([1-9][0-9]*)/ \1/g' | say -v Serena -o "00. Title.aiff" | |
ffmpeg -i "00. Title.aiff" -acodec libmp3lame -ab 192000 -ar 44100 -ac 2 "00. Title.mp3" | |
command ls -1 *.mp3 | sed s/\'/\'\\\\\'\'/g | awk '$0="file \047"$0"\047"' >> tracklist.txt | |
ffmpeg -f concat -safe 0 -i tracklist.txt -c copy "../../Merged with titles/$title.mp3" | |
rm "00. Title.aiff" | |
rm "00. Title.mp3" |
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
# heic-convert() { | |
# local ext | |
# ext="${1:-jpg}" | |
# for img in *.heic; do | |
# convert "$img" "${img%.heic}.$ext" | |
# done | |
# } | |
# Instead of ^this^, do this: | |
mogrify -format jpg *.heic |
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
curl https://raw.githubusercontent.com/dariusk/corpora/master/data/technology/new_technologies.json | jq '.technologies[]' | while read technology; do say -v zarvox "$technology" & done |
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
/** | |
* Moves a React component into its own folder in <src>/components/, adds an index.js for | |
* cleaner imports, and updates the import path in other files. | |
* | |
* Based loosely on the structure shown in https://www.joshwcomeau.com/react/file-structure. | |
* | |
* | |
* Usage | |
* ===== | |
* |
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
// This is a small wrapper around React DnD’s provider that switches to a touch | |
// backend as soon as a touch event is detected. | |
import { useEffect, useState } from 'react'; | |
import { DndProvider } from 'react-dnd'; | |
import { HTML5Backend } from 'react-dnd-html5-backend'; | |
const TOUCH_EVENTS = ['touchstart', 'touchmove', 'touchend', 'touchcancel']; | |
function DndProviderWrapper({ children }) { | |
const [dndProps, setDndProps] = useState({ backend: HTML5Backend }); |
NewerOlder