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
| library(ggplot2) | |
| library(dplyr) | |
| library(stringr) # string manipulation | |
| library(readr) # parse_number | |
| library(magrittr) # pipe and set_names function | |
| if(!"ggimage" %in% installed.packages()) { | |
| install.packages("ggimage") | |
| } |
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 | |
| while getopts r::pvf OPT | |
| do | |
| case "$OPT" in | |
| r) FILE="$OPTARG" # RENDER files with quarto | |
| RENDER=1;; | |
| v) VERBOSE=1;; # VERBOSE - print everything | |
| p) PULL=1;; # Pull new changes | |
| f) FIX=1;; # Fix github repo | |
| esac |
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 | |
| # This concatenates array values using a multi-character separater. | |
| # https://dev.to/meleu/how-to-join-array-elements-in-a-bash-script-303a | |
| joinByString() { | |
| local separator="$1" | |
| shift | |
| local first="$1" | |
| shift | |
| printf "%s" "$first" "${@/#/$separator}" |
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 | |
| # Requires https://github.com/jschobben/colorscad to be somewhere on the path | |
| for m in {1..15} | |
| do | |
| file="multiplication/$(printf '%02dx.scad' ${m})" | |
| cp spinner-multiplication.scad $file | |
| #awk -v a="m=${m};" 'NR==3 { sub(".*insert-m-here", a) }' $file | |
| sed -E -i "3s/.*/m=${m};/" $file | |
| colorscad.sh -i "$file" -o "${file%.scad}.3mf" -f |
OlderNewer