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 / 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
View update-apache-da.sh
#!/usr/bin/env bash
cd /usr/local/directadmin/custombuild
./build update
./build update_da
./build set webserver apache
./build apache
./build rewrite_confs
httpd -v
exit 0
@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
@bouroo
bouroo / directadmin-add-domain.sh
Last active Sep 19, 2019
Bulk Add Domains To DirectAdmin
View directadmin-add-domain.sh
#!/usr/bin/env bash
# Require curl & jq
hash curl 2>/dev/null || { echo >&2 "I require 'curl' but it's not installed. Aborting."; exit 1; }
hash jq 2>/dev/null || { echo >&2 "I require 'jq' but it's not installed. Aborting."; exit 1; }
# Get user infos
read -e -i 'http://domain.com:2222' -p 'DA URL: ' DA_URL
read -p 'DA User: ' DA_USER
read -sp 'DA Password: ' DA_PASS
You can’t perform that action at this time.