Skip to content

Instantly share code, notes, and snippets.

View vichetuc's full-sized avatar

Sath Vichet vichetuc

  • K-Digidata
  • Phnom Penh, Cambodia
View GitHub Profile
@vichetuc
vichetuc / rm_mysql.md
Created December 29, 2018 02:25 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql

@vichetuc
vichetuc / nogap.php
Created December 29, 2018 01:05 — forked from artoodetoo/nogap.php
Efficient Geo IP location in MySQL database
#!/usr/bin/env php
<?php
/*
* Filter to fill the IP gaps in a MaxMind GeoLite tables.
*
* For every missing range in the file it puts a dummy one.
*/
$types = [
'asnum' => [0, 0, 1, "%s,%s,\"-\"\n"],
'blocks' => [2, 0, 1, "\"%s\",\"%s\",\"1\"\n"],
@vichetuc
vichetuc / nginx.conf
Created August 22, 2017 10:54 — forked from toomasr/nginx.conf
nginx configuration for the Wordpress blog post
upstream servers-frontend {
ip_hash;
server 10.10.137.100:80; # server-1
server 10.10.126.101:80; # server-2
}
upstream server-2 {
server 10.10.137.101:80;
}
@vichetuc
vichetuc / Laravel PHP7 LEMP AWS.md
Created June 26, 2017 12:39 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 16.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip