Skip to content

Instantly share code, notes, and snippets.

Code is LOVE

Ghazanfar Mir GhazanfarMir

Code is LOVE
View GitHub Profile
GhazanfarMir / httpd-vhosts.conf
Created Jul 12, 2020
XAMPP Virtual Host for Symfony
View httpd-vhosts.conf
<VirtualHost doctorist-symfony.local:80>
ServerName doctorist-symfony.local
ServerAlias doctorist-symfony.local
DocumentRoot "D:/Data Library/Projects/doctorist/public"
<Directory "D:/Data Library/Projects/doctorist/public">
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
GhazanfarMir / How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

Let's say alice is a user, with 2 or more private repositories repoN. For this example we'll work with just two repositories named repo1 and repo2

You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers. You want to perform git pull origin master for example, and you want this to happen without asking for a password.

GhazanfarMir / wildcard letsencrypt
Last active Apr 23, 2021
Wildcard Certificate with LetsEncrypt
View wildcard letsencrypt
# Virtual Environment Setup
mkdir /opt/certbot
cd /opt/certbot
git clone
cd certbot
git checkout v0.22.0
sudo ./certbot-auto --os-packages-only
source venv/bin/activate
GhazanfarMir /
Created Mar 21, 2018 — forked from leonardofed/
A curated list of AWS resources to prepare for the AWS Certifications

A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

OP: @leonardofed founder @ plainflow.

GhazanfarMir /
Last active Nov 21, 2021
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
GhazanfarMir / wp_calculate_image_srcset.php
Created Jan 19, 2018
Forces CDN subdomain for srcset file list on img element
View wp_calculate_image_srcset.php
* forces CDN subdomain for srcset file list on img element
* Forces Wordpress to use CDN subdomains on srcset list
* used since version 4.4 for responsive images support
* Wordpress, Responsive Web Design, Responsive, Responsive Images, RWD, 4.4, CDN, Subdomains, performance
* @author Celso Bessa <>
GhazanfarMir / Address.php
Created Jul 6, 2017
Laravel: How to create custom model events
View Address.php
// App\Address Model
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\Observers\AddressObserver; // included our Model Observer
GhazanfarMir / 2017_07_05_130329_create_activities_table.php
Last active Jul 6, 2017
Laravel RecordActivity Trait to store user's activities in a activity table
View 2017_07_05_130329_create_activities_table.php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateActivitiesTable extends Migration
* Run the migrations.
GhazanfarMir / GoogleDriveServiceProvider.php
Created Jun 20, 2017 — forked from ivanvermeyen/!
Setup a Laravel Storage driver with Google Drive API
View GoogleDriveServiceProvider.php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class GoogleDriveServiceProvider extends ServiceProvider
* Bootstrap the application services.
GhazanfarMir /
Created Dec 2, 2016 — forked from pete-otaqui/
Bump a software project's VERSION, add the CHANGES, and tag with GIT
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3"
# this script will display the current version, automatically
# suggest a "minor" version update, and ask for input to use
# the suggestion, or a newly entered value.