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
| // by rileyjshaw | |
| // inspired by the camo effect in predator (1987) | |
| void main() { | |
| vec3 color = getCam(uv); | |
| vec2 dir = uv - faceCenter; | |
| float lenDir = length(dir); | |
| if (lenDir < 1e-5) { | |
| dir = vec2(0.0, 1.0); // avoid divide-by-zero at exact center | |
| } else { |
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
| const { createCanvas } = require('canvas'); | |
| const fs = require('fs'); | |
| const gridWidth = parseInt(process.argv[2]) || 16; | |
| const gridHeight = parseInt(process.argv[3]) || 16; | |
| const SQUARE_SIZE = 200; | |
| // Inferred. | |
| const WIDTH_PX = gridWidth * SQUARE_SIZE; | |
| const HEIGHT_PX = gridHeight * SQUARE_SIZE; |
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
| #!/bin/bash | |
| # Ensure the 'converted' directory exists | |
| mkdir -p converted | |
| # Initialize a counter for file naming | |
| counter=1 | |
| # Allowed audio file extensions | |
| allowed_extensions="flac mp3 wav" |
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
| .container | |
| - for i in 1..3 | |
| .shaker | |
| ul.group | |
| - for j in 1..14 | |
| li.line |
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
| #!/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 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
| #!/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 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
| # 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 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
| # 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 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
| 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 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
| /** | |
| * 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 | |
| * ===== | |
| * |
NewerOlder