Skip to content

Instantly share code, notes, and snippets.

View muhamadsyahril's full-sized avatar

Ariel Self muhamadsyahril

  • PT Kreatif Infotek Global
  • Bogor
View GitHub Profile
@muhamadsyahril
muhamadsyahril / Instal_and_configure_nginx.md
Created February 14, 2023 06:34 — forked from ynwd/Instal_and_configure_nginx.md
Install and Configure Nginx on Mac

Install

$ brew install nginx

Setelah install jalankan nginx.
$ sudo nginx

Testing

Test apakah nginx sudah running, buka url http://localhost:8080.

Ganti default port

@muhamadsyahril
muhamadsyahril / mysql-docker.sh
Created March 8, 2020 10:03 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@muhamadsyahril
muhamadsyahril / nginx_setup.sh
Created December 6, 2018 13:20 — forked from minhajuddin/nginx_setup.sh
nginx setup stuff
#create sites-enabled directory to hold config symlinks
sudo mkdir -p /etc/nginx/sites-enabled
#symlink the webapps directory to /var/www/apps
sudo mkdir -p /var/www
sudo ln -ns /home/minhajuddin/webapps /var/www/apps
#symlink an nginx config file to a webapps config file
sudo ln -ns /var/www/apps/ramanujan/config/nginx.conf /etc/nginx/sites-enabled/ramanujan.conf
#hookup /etc/init.d/nginx to auto-start at startup
/usr/sbin/update-rc.d -f nginx defaults
# NGINX CodeIgniter Config
server
{
server_name .organizetheweb.com;
access_log /var/log/nginx/organizetheweb.com.access.log;
root /var/www/organizetheweb.com/trunk;
@muhamadsyahril
muhamadsyahril / mysql-triggers.sql
Created February 26, 2018 10:10 — forked from anytizer/mysql-triggers.sql
The mysql triggers examples
# INSERT
# -- before: Check uniqueness
# -- after:
# UPDATE
# -- before: Log old data
# -- after: Email admin queue
# DELETE
# -- before: check for dues
# -- after: System cleanup
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y
sudo apt-get install libfreetype6 libfreetype6-dev -y
sudo apt-get install libfontconfig1 libfontconfig1-dev -y
cd ~
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2
sudo tar xvjf $PHANTOM_JS.tar.bz2
sudo mv $PHANTOM_JS /usr/local/share
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin