Skip to content

Instantly share code, notes, and snippets.

View GhazanfarMir's full-sized avatar
😍
Code is LOVE

Ghazanfar Mir GhazanfarMir

😍
Code is LOVE
View GitHub Profile
@GhazanfarMir
GhazanfarMir / httpd-vhosts.conf
Created July 12, 2020 13:36
XAMPP Virtual Host for Symfony
<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
Created February 27, 2019 21:56 — forked from gubatron/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

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 April 1, 2023 19:34
Wildcard Certificate with LetsEncrypt
# 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 March 21, 2018 11:19 — forked from leonardofed/README.md
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
GhazanfarMir / Instructions.sh
Last active December 21, 2023 22:55
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
GhazanfarMir / wp_calculate_image_srcset.php
Created January 19, 2018 12:38
Forces CDN subdomain for srcset file list on img element
<?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 July 6, 2017 14:47
Laravel: How to create custom model events
<?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 July 6, 2017 09:19
Laravel RecordActivity Trait to store user's activities in a activity 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
GhazanfarMir / GoogleDriveServiceProvider.php
Created June 20, 2017 16:18 — forked from ivanvermeyen/!NOTE.md
Setup a Laravel Storage driver with Google Drive API
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class GoogleDriveServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
@GhazanfarMir
GhazanfarMir / bumpversion.sh
Created December 2, 2016 12:42 — forked from pete-otaqui/bumpversion.sh
Bump a software project's VERSION, add the CHANGES, and tag with GIT
#!/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.