Skip to content

Instantly share code, notes, and snippets.

View rizkiheryandi's full-sized avatar
🎯
Focusing

Rizki Heryandi rizkiheryandi

🎯
Focusing
View GitHub Profile
@rizkiheryandi
rizkiheryandi / update_php_macos_catalina.sh
Last active September 30, 2020 04:20
Update PHP on MacOS Catalina
1. Install php7.3 with brew
brew install [email protected]
2. Use php7.3 on system
brew link [email protected]
3. Set php7.3exe to default PHP
@rizkiheryandi
rizkiheryandi / Internship and fresh graduate learning library
Last active July 23, 2023 22:54
Internship and fresh graduate learning library for first day preparation
- Fundamental HTML (penguatan dasar" HTML)
https://www.w3schools.com/html/html_forms.asp -> Pelajari dari awal sampai akhir / habis
- Fundamental CSS (penguatan dasar" CSS)
https://www.w3schools.com/css/default.asp -> Pelajari dari awal sampai akhir / habis
- Belajar Bootstrap 5
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?q=$uri&$args;
#try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
@rizkiheryandi
rizkiheryandi / wordpress_https.txt
Last active October 26, 2018 17:48
Step by step to migrate wordpress to use HTTPS protocol without ERROR (Based on experience), in this case is using cloudflare, but if you have own certificate from let's encrypt or buy from somewhere, you can midofied it
1. Open Cloudflare account
2. Make sure flexible SSL certificate enabled under “Crypto” tab
3. Open WP dashboard
4. Install and activate 2 plugins in this order:
a. Cloudflare - SIgn in with Cloudflare email and “global” api code, then in the plugin go to “settings” > click to turn on “Automatic HTTPS Rewrites” setting in plugin
b. Really Simple SSL - Install the plugin and click activate > click “Go ahead, activate SSL!” button on the window now on the dashboard. (Once activated you will be logged out of Wordpress, this is normal just follow the next steps)
5. Go back to your Cloudflare account
6. Go to “Page Rules” tab > click “Create Page Rule” button
7. Add 1 page rule: http://*example.com/* > under the “Then the settings are” option choose “Always use HTTPS” > click “Save and Deploy”
8. You will be able to log back into your Wordpress dashboard & check your site is secure and displaying the SSL certificate in the address bar on your browser.
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php$is_args$args;
}
#!/bin/sh
# Title : Laravel permission in production server
# Author: rizkiheryandi.github.io
# NOTE : Run it in your Laravel root directory
# Define variable
yourself="ubuntu"
# Make all Laravel folder own by APACHE / NGINX user and group
#!/bin/sh
# Title : Ubuntu LEMP stack setup
# Author: rizkiheryandi.github.io
# Define variable
specific_user=""
project_folder=""
php_version=""
php_module="php${php_version}-fpm php${php_version}-mysql php${php_version}-curl php${php_version}-gd php${php_version}-mbstring php${php_version}-mcrypt php${php_version}-xml php${php_version}-xmlrpc php${php_version}-zip"
@rizkiheryandi
rizkiheryandi / wordpress_linux_permission_fix.sh
Last active November 2, 2018 16:24
Bash file for fix Wordpress permission in Linux
echo "---------------------------------------------------"
echo "Warning: Enter Your Wordpress path in proper format as Example shown below:"
echo "Example: var/www/html/wordpress/"
echo "---------------------------------------------------"
read path
echo "enter permission type d (default is 755)"
read perm1
echo "enter permission type f (default is 644)"
read perm2
sudo chown -R www-data:www-data ../../../../../../../../$path
#!/bin/sh
# Title : Ubuntu LAMP stack setup
# Author: rizkiheryandi.github.io
# Define variable
specific_user=""
php_modules=""
# Update the modules
# Title : LEMP stack installation on ubuntu
# Author: Rizki Heryandi | rizkiheryandi.github.io