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 bash | |
if [[ $# -gt 0 ]] | |
then | |
filename=$1 | |
tsuml2 --glob $filename -m -o $filename.svg | |
else | |
echo "Error: arguments missing!" | |
echo "Syntax: uml <filename>" | |
fi |
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 bun | |
import { parseArgs } from "node:util"; | |
const VERSION = '1.0.0'; | |
const { values, positionals } = parseArgs({ | |
args: Bun.argv, | |
options: { | |
file: { | |
type: "string", |
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
function fitIn(template, ...values) { | |
// console.log(template, values); | |
let result = []; | |
for (let i = 0; i < template.length; i++) { | |
result.push(template[i]); | |
if (i < values.length) { | |
result.push(values[i]); | |
} | |
} | |
return result.join(""); |
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 | |
# This script takes two arguments: input filename and output filename | |
# It uses imagemagick to convert the input file to a png file with specified options | |
# Check if the number of arguments is correct | |
if [ $# -ne 2 ]; then | |
app_name=${0##*/} | |
echo "Syntax: $app_name <input> <output>" | |
echo "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
#!/bin/bash | |
# This script takes two arguments: input filename and output filename | |
# It uses imagemagick to convert the input file to a pdf file with specified options | |
# Check if the number of arguments is correct | |
if [ $# -ne 2 ]; then | |
app_name=${0##*/} | |
echo "Syntax: $app_name <input> <output>" | |
echo "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
#!/bin/zsh | |
# This script takes three arguments: input filename, output filename and optional font-face name | |
# It uses pandoc to convert the input file to a pdf file with specified options | |
# If no font-face name is provided, it defaults to 'Optima' | |
# Check if the number of arguments is correct | |
if [ $# -lt 2 ] || [ $# -gt 3 ]; then | |
echo "Usage: ${0##*/} input.md output.pdf [font-face]" | |
exit 1 |
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 | |
# This script takes two arguments: input filename and output filename | |
# It uses pandoc to convert the input file to a html file with specified options | |
# Check if the number of arguments is correct | |
if [ $# -ne 2 ]; then | |
echo "Usage: ${0##*/} input.md output.html" | |
exit 1 | |
fi |
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/zsh | |
while getopts ":f:" opt; do | |
case ${opt} in | |
f ) | |
file=$OPTARG | |
;; | |
\? ) | |
echo "Invalid option: -$OPTARG" 1>&2 | |
exit 1 |
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 | |
# Check the number of arguments | |
if [ $# -ne 4 ]; then | |
echo "Usage:" | |
echo " ${0##*/} <input> <output> <start> <end>" | |
echo "Arguments:" | |
echo " input the name of the input video file" | |
echo " output the name of the output video file" | |
echo " start the start time of the clip to be removed in hh:mm:ss format" |
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 | |
# Check the number of arguments | |
if [ $# -ne 1 ]; then | |
echo "Error: No arguments provided" | |
exit 1 | |
fi | |
display_help_menu() { |
NewerOlder