Skip to content

Instantly share code, notes, and snippets.

Kawin Viriyaprasopsook bouroo

Block or report user

Report or block bouroo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bouroo
bouroo / pacman-init.sh
Last active Nov 11, 2019
Init arch linux pacman
View pacman-init.sh
#!/usr/bin/env bash
# Enable networkd and resolved
systemctl enable systemd-networkd
systemctl enable systemd-resolved
systemctl restart systemd-networkd
systemctl restart systemd-resolved
# Init pacman mirror
curl -s -L "https://www.archlinux.org/mirrorlist/?country=TH&country=SG&country=IN&country=JP&protocol=https&ip_version=4" | sed -e 's/^#Server/Server/' -e '/^#/d' > /etc/pacman.d/mirrorlist
@bouroo
bouroo / win10SMB.ps1
Created Aug 22, 2019
Windows 10 SMBv2 & SMBv1 Client
View win10SMB.ps1
Set-SmbClientConfiguration -EnableInsecureGuestLogons $true
Set-SmbServerConfiguration -EnableSMB2Protocol $true
Enable-WindowsOptionalFeature -Online -FeatureName "SMB1Protocol"
Enable-WindowsOptionalFeature -Online -FeatureName "SMB1Protocol-Client"
@bouroo
bouroo / adapta_papirus.sh
Created Aug 15, 2019
Ubuntu adapta + papirus
View adapta_papirus.sh
#!/usr/bin/env bash
if [ "$(whoami)" != "root" ]; then
SUDO=sudo
fi
${SUDO} add-apt-repository -y ppa:tista/adapta
${SUDO} add-apt-repository -y ppa:papirus/papirus
${SUDO} apt update
${SUDO} apt install -y adapta-gtk-theme papirus-icon-theme
@bouroo
bouroo / openvpn.sh
Created Jun 29, 2019
Install OpenVPN from OpenVPN project's own software repositories
View openvpn.sh
#!/usr/bin/env bash
if [ "$(whoami)" != "root" ]; then
SUDO=sudo
fi
if ! $(type lsb_release > /dev/null 2>&1) ; then
${SUDO} apt install -y lsb-release
fi
@bouroo
bouroo / pve-auto-remount.sh
Last active Jun 14, 2019
Service "pvestatd" tries to remount every nfs share every 10 seconds automatically, So add this script to cron every minute.
View pve-auto-remount.sh
#!/usr/bin/env bash
list=$(ls /mnt/pve)
for i in $list
do
status=$(ls /mnt/pve/$i 2>&1)
if [[ $status =~ .*Stale.* ]]
then
umount /mnt/pve/$i
@bouroo
bouroo / thai-id-card.js
Last active Jun 12, 2019
Thai National ID Card reader in NodeJS
View thai-id-card.js
/* eslint-disable no-console */
/*
* Thai National ID Card reader in NodeJS
*
* Linux
* apt install libpcsclite-dev libpcsclite1 pcscd build-essential
*
* Windows
* yarn global add windows-build-tools
*
@bouroo
bouroo / centos-ml-kernel.sh
Last active Aug 5, 2019
Update CentOS mainline stable kernel for deploy Google BBR
View centos-ml-kernel.sh
#!/usr/bin/env bash
if [ "$(whoami)" != "root" ]; then
SUDO=sudo
fi
if ! $(type lsb_release > /dev/null 2>&1) ; then
${SUDO} yum install -y redhat-lsb-core
fi
@bouroo
bouroo / update-apache-da.sh
Last active Nov 1, 2019
Update directadmin webserver and add some security
View update-apache-da.sh
#!/usr/bin/env bash
cd /usr/local/directadmin/custombuild
./build set webserver apache
./build set php1_release 7.2
./build set php2_release 5.6
./build set php1_mode php-fpm
./build set php2_mode php-fpm
./build set mod_ruid2 no
./build set secure_php yes
#./build set mysql_inst mariadb
@bouroo
bouroo / th-fonts.sh
Last active Aug 26, 2019
Install thai fonts for debian, ubuntu
View th-fonts.sh
#!/usr/bin/env bash
if [ "$(whoami)" != "root" ]; then
SUDO=sudo
fi
${SUDO} apt update && ${SUDO} apt -y upgrade
${SUDO} apt -y install curl
echo "Install Thai Font for ubuntu"
@bouroo
bouroo / 60-zercle.conf
Last active Sep 1, 2019
Kernel tuning for dedicated linux server. /etc/sysctl.d/60-zercle.conf
View 60-zercle.conf
# Kernel sysctl configuration file for Linux
# https://www.kernel.org/doc/Documentation/sysctl/
#
# Original by Michiel Klaver <https://klaver.it/linux/sysctl.conf>
# Modify by Kawin Viriyaprasopsook <kawin.vir@zercle.tech>
#
# The following is suitable for dedicated web server, mail, file server, KVM server etc.
# place file in /etc/sysctl.d/60-zercle.conf
# and run sysctl --system
You can’t perform that action at this time.