Skip to content

Instantly share code, notes, and snippets.

View realmau5's full-sized avatar
🏠
Working from home

Kashif Ahamed realmau5

🏠
Working from home
View GitHub Profile
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /opt/homebrew/etc/nginx/ssl/{{host}}.crt;
ssl_certificate_key /opt/homebrew/etc/nginx/ssl/{{host}}.key;
ssl_ciphers HIGH:!aNULL:!MD5;
# listen 80;
server_name {{host}};
@realmau5
realmau5 / mac-homebrew-lamp.md
Created August 29, 2022 14:49 — forked from kitloong/mac-homebrew-lamp.md
Mac - Install Apache, PHP, MySQL + phpMyAdmin with Homebrew

!!! This guide was created with Macbook Pro M1. Path may vary for different or even same machine.

Install Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Install PHP

@realmau5
realmau5 / monitor.sh
Created March 24, 2019 17:51 — forked from mheadd/monitor.sh
Simple bash script to check whether MySQL is running.
#!/bin/bash
UP=$(pgrep mysql | wc -l);
if [ "$UP" -ne 1 ];
then
echo "MySQL is down.";
sudo service mysql start
else
echo "All is well.";
fi

STEPS

  • Click on Help menu

  • Select Enter License

  • Then paste given KEY given at bottom

  • Finally click on Use License

@realmau5
realmau5 / .htaccess
Created January 8, 2018 06:50 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@realmau5
realmau5 / Gulpfile.js
Created January 5, 2018 06:40
Basic Gulp setup
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
rename = require('gulp-rename'),
concat = require('gulp-concat'),
notify = require('gulp-notify'),
cache = require('gulp-cache'),
@realmau5
realmau5 / sample-mongo-commands.json
Created November 16, 2017 08:56 — forked from jatinchauhann/sample-mongo-commands.json
Mondo DB useful commands for beginners. Adapted from a YouTube Video - https://www.youtube.com/watch?v=pWbMrx5rVBE
//after installing mondodb
//cd to the 'bin' directory of the mongodb folder
//run the following commands in the cmd (run as administrator -for Windows)
mongod --directoryperdb --dbpath C:\mongodb\data\db --logpath C:\mongodb\log\mongo.log --logappend --rest --install
//to start the mongodb service
net start MongoDB
//to enter mongodb service (this is necessary to start the mongo service)
mongo
@realmau5
realmau5 / README.md
Created November 14, 2017 11:02 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@realmau5
realmau5 / vsftpd.conf
Last active April 17, 2017 16:31
vsftpd FTP server - configuration (works!)
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#