Skip to content

Instantly share code, notes, and snippets.

View kungfu321's full-sized avatar
🎯
Focusing

Vo Manh Kien kungfu321

🎯
Focusing
View GitHub Profile
@kungfu321
kungfu321 / countries.json
Created July 27, 2019 03:56 — forked from keeguon/countries.json
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@kungfu321
kungfu321 / install.sh
Last active February 24, 2022 02:38
install vps and wordpress. curl -sO
#!/bin/bash
#######################################################
# HocVPS Script v2.0.4 for CentOS 7
# To install type:
# curl -sO https://hocvps.com/install && bash install
# or
# curl -sO https://hocvps.com/scripts/$(rpm -E %centos)/install && bash install
#######################################################
hocvps_version="2.0.4"
phpmyadmin_version="4.8.0.1" # Released 2018-04-19. Future version compatible with PHP 5.5 to 7.2 and MySQL 5.5 and newer.
@kungfu321
kungfu321 / wp.sh
Created November 21, 2018 01:20
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@kungfu321
kungfu321 / wp-setup.sh
Last active October 23, 2018 09:52
./wp-setup.sh -d _domain -s _ssh-key
#!/bin/bash
# get params
while getopts s:d: option
do
case "${option}"
in
s) SSH_KEY=${OPTARG};;
d) DOMAIN=${OPTARG};;
esac
@kungfu321
kungfu321 / lemp-setup.sh
Last active October 17, 2018 01:14
lemp setup
#!/bin/bash
cd ~
sudo yum update -y
sudo yum install epel-release -y
# install php and nginx
sudo yum --enablerepo=remi,remi-php70 install -y nginx php-fpm php-common -y
sudo yum --enablerepo=remi,remi-php56 install -y php-opcache php-pecl-apcu php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongo php-pecl-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml - y
sudo systemctl stop httpd.service
@kungfu321
kungfu321 / www.conf
Created October 15, 2018 14:50
PHP-FPM config
; Start a new pool named 'www'.
[www]
; The address on which to accept FastCGI requests.
; Valid syntaxes are:
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
; a specific port;
; 'port' - to listen on a TCP socket to all addresses on a
; specific port;
; '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
@kungfu321
kungfu321 / default.conf
Last active October 16, 2018 16:03
nginx config sample
# The default server
#
server {
listen 80;
server_name example.com;
location / {
root /var/www/html;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?q=$uri&$args;