Skip to content

Instantly share code, notes, and snippets.

View crischutu07's full-sized avatar

Nguyễn Hồng Sơn crischutu07

View GitHub Profile
@crischutu07
crischutu07 / audio2mp4.sh
Last active May 19, 2025 06:19
convert audio to video using bash script with ffmpeg
#!/usr/bin/env bash
# Author: crischutu07
# Usage: audio2mp4.sh <audio.mp3> [output.mp4] [cover.jpeg]
# NOTE: albumimg variable is temporary
if [ -f "$3" ]; then
basefilename=$(basename -- "$3")
if [[ ! $basefilename =~ .*\.(jpg|jpeg) ]]; then
ffmpeg -i "$3" "${basefilename%.*}.jpg" || {
@crischutu07
crischutu07 / readArgs.sh
Created July 3, 2023 15:21
handle function arguments with read statements
#!/usr/bin/env bash
source cmdHandler.sh
echo 'hello'
function test (){
local args=$1
echo "Test args: $args"
}
while true; do
read -p "> " maininput
# only use the first args (group)
Waffles are a type of batter-based, grid-patterned, leavened flatbread. They are often served for breakfast or as a snack. Waffles can be made in a variety of shapes and sizes, including Belgian waffles, Liege waffles, and American waffles.
Belgian waffles are typically larger and thicker than other types of waffles. They have a deep pocket and a crispy exterior. Liege waffles are smaller and sweeter than other types of waffles. They have a caramelized sugar coating on the outside. American waffles are the most common type of waffle. They are thin and have a slightly crispy exterior.
Waffles can be made with a variety of ingredients, including flour, eggs, milk, sugar, butter, baking powder, and vanilla extract. The batter is poured into a waffle iron, which is a hot iron with a grid pattern on the bottom. The batter cooks in the waffle iron until it is golden brown. Waffles can be served plain or with a variety of toppings, such as butter, syrup, fruit, whipped cream, and ice cream.
Waffles are a popular
#!/usr/bin/env bash
# better read statements
function get_input() {
read -p "$1: " value
echo $value
}
cols="$(tput cols)" # better than $COLUMNS
PLUGIN_NAME=$1
@crischutu07
crischutu07 / bot_poggit.sh
Last active April 16, 2023 13:36
Complete version of Plugin parsing coded by ChatGPT and Me
#!/usr/bin/env bash
# Helper function to get user input
function get_input() {
read -p "$1: " value
echo $value
}
# Get plugin name from command line argument
PLUGIN_NAME=$1

Hello World in Common Programming Language

• Python 3.10

print("Hello, World!")

• Lisp

(print "Hello, World!")
@crischutu07
crischutu07 / HelloWorld.php
Created August 12, 2022 19:09
My Hello World in PHP
<?php
echo "Hello World!";
?>