apt -y install fail2ban nano sudo vlan ifupdown2 ipvsadm ipset wget curl mtr-tiny net-tools tmux unattended-upgrades open-iscsi glances btop htop
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
#!/usr/bin/env bash | |
cat <<-'EOF' > /etc/yum.repos.d/CentOS-Base.repo | |
[C6.10-base] | |
name=CentOS-6.10 - Base | |
baseurl=http://vault.centos.org/6.10/os/$basearch/ | |
gpgcheck=1 | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 | |
enabled=1 | |
metadata_expire=never |
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
{ | |
"listeners": { | |
"*:8080": { | |
"pass": "routes/main" | |
} | |
}, | |
"routes": { | |
"main": [ | |
{ | |
"action": { |
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
# Environment variables for PostgreSQL containers | |
x-default-pg-env: &default-pg-env | |
# Set the timezone to Asia/Bangkok | |
TZ: Asia/Bangkok | |
# Username for the PostgreSQL administrative account | |
POSTGRESQL_USERNAME: postgres | |
# Name of the default PostgreSQL database | |
POSTGRESQL_DATABASE: postgres | |
# Password for the PostgreSQL administrative account | |
POSTGRESQL_PASSWORD: mysecretpassword |
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
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ | |
// © bouroo | |
//@version=5 | |
strategy("Turtle Trading Strategy with Supertrend Confirmation", overlay=true) | |
// Turtle Trading Parameters | |
length1 = input.int(20, title="Donchian Channel Length (Breakout)") | |
length2 = input.int(10, title="Donchian Channel Length (Exit)") | |
risk_pct = input.float(2.0, title="Risk Percentage per Trade") |
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
#!/usr/env/bash | |
# Thailand | |
speedtest -s 27203 | |
# Singapore | |
speedtest -s 2054 |
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
#!/usr/bin/env bash | |
# Exit immediately if a command exits with a non-zero status. | |
set -e | |
# Find the device containing the root filesystem (e.g., /dev/sda3) | |
ROOT_PARTITION=$(findmnt -n -o SOURCE /) | |
# Check if ROOT_PARTITION was found | |
if [ -z "$ROOT_PARTITION" ]; then | |
echo "Error: Could not determine root partition." |
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
use std::{ | |
fs::File, | |
io::{self, Write}, | |
str, | |
}; | |
use pcsc::{Attribute, Card, Context, Error, Scope, ShareMode}; | |
use charmap::WINDOWS_874; | |
// Data field commands (label, command APDU) | |
const FIELDS: &[(&str, [u8; 7])] = &[ |
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
#!/usr/bin/env bash | |
#============================================================================== | |
# title: php56.sh | |
# description: This script automatically installs PHP 5.6 on Plesk RHEL | |
# author: Kawin Viriyaprasopsook <[email protected]> | |
# usage: bash php56.sh | |
# notes: need `gcc libxml2-devel` packages | |
#============================================================================== | |
dnf -y install gcc libxml2-devel |
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
#!/usr/bin/env bash | |
#============================================================================== | |
# title: gen_kustomization.sh | |
# description: This script automatically creates kustomization deployment files from kubectl | |
# author: Kawin Viriyaprasopsook <[email protected]> | |
# usage: bash gen_kustomization.sh | |
# notes: need `kubectl kubectl-convert kubectl-neat` packages | |
#============================================================================== | |
mkdir -p kustomization && cd kustomization |