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 / spectrum_drawtext.md
Last active July 28, 2023 11:39
Spectrum with drawtext

Spectrum with drawtext

The bash script below is a code that make audio files or input audio video to be spectrum

#!/usr/bin/env bash
spectrum_mode="combined"
spectrum_slide="scroll"
x=0 # place x coord drawtext
y=0 # place y coord drawtext
file='input.m4a' # input files
{
"monkey": {
"chuu": {
"height": 145
},
"field": {
"height": 147
},
"ti": {
"height": 154.94
@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)
#!/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
@crischutu07
crischutu07 / qotd_vn.json
Created April 4, 2023 15:38
20 Different QOTD by ChatGPT. Topic: About Vietnam
{
"qotd": [
{
"question": "What is the capital city of Vietnam?",
"answer": "Hanoi"
},
{
"question": "What is the official language of Vietnam?",
"answer": "Vietnamese"
},

Hello World in Common Programming Language

• Python 3.10

print("Hello, World!")

• Lisp

(print "Hello, World!")
<?php
declare(strict_types=1);
namespace ExamplePlugin;
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\plugin\PluginBase;
use pocketmine\utils\TextFormat;
⠀⣞⢽⢪⢣⢣⢣⢫⡺⡵⣝⡮⣗⢷⢽⢽⢽⣮⡷⡽⣜⣜⢮⢺⣜⢷⢽⢝⡽⣝
⠸⡸⠜⠕⠕⠁⢁⢇⢏⢽⢺⣪⡳⡝⣎⣏⢯⢞⡿⣟⣷⣳⢯⡷⣽⢽⢯⣳⣫⠇
⠀⠀⢀⢀⢄⢬⢪⡪⡎⣆⡈⠚⠜⠕⠇⠗⠝⢕⢯⢫⣞⣯⣿⣻⡽⣏⢗⣗⠏⠀
⠀⠪⡪⡪⣪⢪⢺⢸⢢⢓⢆⢤⢀⠀⠀⠀⠀⠈⢊⢞⡾⣿⡯⣏⢮⠷⠁⠀⠀
⠀⠀⠀⠈⠊⠆⡃⠕⢕⢇⢇⢇⢇⢇⢏⢎⢎⢆⢄⠀⢑⣽⣿⢝⠲⠉⠀⠀⠀⠀
⠀⠀⠀⠀⠀⡿⠂⠠⠀⡇⢇⠕⢈⣀⠀⠁⠡⠣⡣⡫⣂⣿⠯⢪⠰⠂⠀⠀⠀⠀
⠀⠀⠀⠀⡦⡙⡂⢀⢤⢣⠣⡈⣾⡃⠠⠄⠀⡄⢱⣌⣶⢏⢊⠂⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⢝⡲⣜⡮⡏⢎⢌⢂⠙⠢⠐⢀⢘⢵⣽⣿⡿⠁⠁⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠨⣺⡺⡕⡕⡱⡑⡆⡕⡅⡕⡜⡼⢽⡻⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⣼⣳⣫⣾⣵⣗⡵⡱⡡⢣⢑⢕⢜⢕⡝⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
@crischutu07
crischutu07 / HelloWorld.php
Created August 12, 2022 19:09
My Hello World in PHP
<?php
echo "Hello World!";
?>