Skip to content

Instantly share code, notes, and snippets.

View faizalmansor's full-sized avatar
🎯
Focusing on making the world a better place

Osh faizalmansor

🎯
Focusing on making the world a better place
View GitHub Profile
@faizalmansor
faizalmansor / change-mysql-root-pwd.md
Last active September 16, 2020 07:36
Change MySQL root password easily

Change MySQL root password easily

  1. Log on to your system as the user that MySQL server runs as (for example, mysql)

  2. Stop the MySQL server if it is running

shell> ps ax | grep mysql
3425 mysqld
shell> kill 3425
@faizalmansor
faizalmansor / slate-on-ubuntu1804.md
Last active January 14, 2020 05:15
Install Slate API Docs Generator on Ubuntu 18.04 LTS

When installing slate on ubuntu 18.04 I stumbled upon this error:

Can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)

So checking the bundler version of slate:

$ cat Gemfile.lock | grep -A 1 "BUNDLED WITH"
BUNDLED WITH
   2.0.2

Keybase proof

I hereby claim:

  • I am faizalmansor on github.
  • I am faizalmansor (https://keybase.io/faizalmansor) on keybase.
  • I have a public key ASBoMfh3abB6YHZnKjcI8cth9t1zpAkUxKbXNWKS8PC7kQo

To claim this, I am signing this object:

@faizalmansor
faizalmansor / ost-setup-mailx.sh
Last active June 24, 2019 11:20
Script to automate installation & configuration of mailx
#!/bin/bash
# Script : ost-setup-mailx.sh
# Author : Osh <faizal@myopensoft.net>
# Title : Osh Automated Mailx Installer
# Description: Script to automate installation & configuration of mailx
# Target OS : Centos 7
echo "Start Osh Automated Mailx Installer..."
@faizalmansor
faizalmansor / mysql-change-root-pass.md
Last active March 30, 2024 03:43
MySQL / MariaDB Change Root Password Step by Step

MySQL / MariaDB Change Root Password

The initial root password on install can be found by running

grep 'temporary password' /var/log/mysqld.log

  1. Stop mysql:

systemctl stop mysqld

  1. Set the mySQL environment option
@faizalmansor
faizalmansor / ost-local-backup-w-email.sh
Last active June 24, 2019 11:22
Script to automate local backup for files & database with email notification
#!/bin/bash
# Script : ost-local-backup-w-email.sh
# Author : Osh <faizal@myopensoft.net>
# Title : Osh local backup with email notification
# Description: Script to automate local backup for files & database with email notification
# Target OS : Centos 7
# Create archive of target folder
today=`date '+%Y%m%d_%H%M%S'`;
@faizalmansor
faizalmansor / ost-oassi-centos7.sh
Created April 18, 2019 06:15
BASH Script to automate fail2ban installation and configuration on Centos 7
#!/bin/bash
# Script : ost-oassi-centos7.sh
# Author : Osh <faizal@myopensoft.net>
# Title : Osh Automated Server Security Installer
# Description: Script to automate installation & configuration of fail2ban
# Target OS : Centos 7
echo "Start Osh Automated Server Security Installer..."
@faizalmansor
faizalmansor / install-moodle35-centos7-nginx.md
Last active June 20, 2020 22:19
How to Install Moodle 3.5 on Centos 7 with Nginx

How to Install Moodle 3.5 on Centos 7 with nginx

Prepare the environment

Step 1 — Installing Nginx on CentOS 7

Since Nginx is not available in default CentOS repositories, we will install EPEL repository by running this command:

yum install epel-release -y

Install nginx

@faizalmansor
faizalmansor / raspi-zero-w-golang.md
Last active January 23, 2024 17:57
Installing Go on Raspberry Pi Zero W
wget https://dl.google.com/go/go1.9.3.linux-armv6l.tar.gz
tar -C /usr/local -xzf go1.9.3.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin