Skip to content

Instantly share code, notes, and snippets.

Avatar
😍
Code is LOVE

Ghazanfar Mir GhazanfarMir

😍
Code is LOVE
View GitHub Profile
@GhazanfarMir
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
GhazanfarMir / multiple-deploy-keys-multiple-private-repos-github-ssh-config.md How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent
View multiple-deploy-keys-multiple-private-repos-github-ssh-config.md

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

https://github.com/alice/repo1

https://github.com/alice/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
GhazanfarMir / wildcard letsencrypt certificate.sh
Last active Apr 23, 2021
Wildcard Certificate with LetsEncrypt
View wildcard letsencrypt certificate.sh
# Virtual Environment Setup
mkdir /opt/certbot
cd /opt/certbot
git clone https://github.com/certbot/certbot
cd certbot
git checkout v0.22.0
sudo ./certbot-auto --os-packages-only
./tools/venv.sh
source venv/bin/activate
@GhazanfarMir
GhazanfarMir / README.md
Created Mar 21, 2018 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications
View README.md


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
GhazanfarMir / Instructions.sh
Last active Nov 21, 2021
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
View Instructions.sh
########## 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
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
<?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 <celso.bessa@2aces.com.br>
@GhazanfarMir
GhazanfarMir / Address.php
Created Jul 6, 2017
Laravel: How to create custom model events
View Address.php
<?php
// App\Address Model
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\Observers\AddressObserver; // included our Model Observer
/**
@GhazanfarMir
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
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateActivitiesTable extends Migration
{
/**
* Run the migrations.
@GhazanfarMir
GhazanfarMir / GoogleDriveServiceProvider.php
Created Jun 20, 2017 — forked from ivanvermeyen/!NOTE.md
Setup a Laravel Storage driver with Google Drive API
View GoogleDriveServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class GoogleDriveServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
@GhazanfarMir
GhazanfarMir / bumpversion.sh
Created Dec 2, 2016 — forked from pete-otaqui/bumpversion.sh
Bump a software project's VERSION, add the CHANGES, and tag with GIT
View bumpversion.sh
#!/bin/bash
# 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.