Skip to content

Instantly share code, notes, and snippets.

View lionants02's full-sized avatar

Max Thanachai Thongkum lionants02

View GitHub Profile
@lionants02
lionants02 / pyramid apache echarts.js
Last active November 19, 2022 18:22
template Pyramid apache echarts
option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
valueFormatter: (value) => Math.abs(value)
},
legend: {
itemWidth: 30,
@lionants02
lionants02 / loop.sh
Created March 12, 2024 01:38
shell script loop
s_start=8
s_end=20
for j in $(seq $s_start $s_end); do
mkdir $j
max=8
for i in $(seq 1 $max); do
echo "$j $i"
mv l* L* $j/
sleep 7
@lionants02
lionants02 / clearcache.sh
Created March 18, 2024 08:33
Ubuntu clear cache
#!/bin/bash
# Note, we are using "echo 3", but it is not recommended in production instead use "echo 1"
echo "echo 1 > /proc/sys/vm/drop_caches"
echo 1 > /proc/sys/vm/drop_caches
@lionants02
lionants02 / 7z-command.sh
Last active May 1, 2024 23:36
command 7z 7za encrypt and split file 1GB 4thread
7za -v1g a encrypted.7z -mx=3 -mmt=4 -ppassword -mhe=on /ttt