Skip to content

Instantly share code, notes, and snippets.

View sheikhwaqas's full-sized avatar

Waqas Ashraf sheikhwaqas

View GitHub Profile
@sheikhwaqas
sheikhwaqas / lets-encrypt-ssl-installation-on-iis.md
Created October 16, 2024 10:58
Procedure to install Let's Encrypt SSL Certificate on IIS / Windows

How to Install Let's Encrypt SSL Certificate on IIS

  1. Open the following link in your browser Win-Acme
  2. Click on the Download link in the menubar and download the latest version
  3. Extract the ZIP file to a folder on your server, (e.g. C:\win-acme)
  4. Open Command Prompt or PowerShell as an Administrator
  5. Navigate to the directory where you extracted win-acme (e.g. C:\win-acme)
  6. Run the following command to start the win-acme client wacs.exe
  7. It will present you with options to create a New SSL Certificate or Renew existing SSL Certificate
  8. Ideally, Select More Options and Add a Scheduled Task that can automatically renew the SSL Certificate
@sheikhwaqas
sheikhwaqas / application-name.service
Created October 2, 2024 09:19
Linux SystemD Service Creation Syntax
[Unit]
Description=Service Description
After=network.target
[Service]
User=user-to-run-service-as
Group=group-to-run-service-as
WorkingDirectory=absolute-path-for-application
ExecStart=absolute-path-for-binary-runtime-file
Restart=on-failure
@sheikhwaqas
sheikhwaqas / .vimrc
Created October 2, 2024 09:08
My VIM Editor Configuration
" General Indentation Options
set autoindent " New lines inherit the indentation of previous lines
set expandtab " Convert tabs to spaces
set shiftwidth=4 " When shifting, indent using four spaces
set tabstop=4 " Indent using four spaces
set softtabstop=4 " The amount of space added or removed by Tab or Backspace key
set smartindent " Auto-indent intelligently
set smarttab " Insert 'tabstop' number of spaces when the Tab keys is pressed
" Visual Formatting
@sheikhwaqas
sheikhwaqas / vhost.conf
Last active September 30, 2021 09:54
Nginx Configuration for Laravel 8.x Deployment
server {
listen 80;
listen [::]:80;
server_name <domain_name>;
root <document_root>;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
########################################################################
# Installing and Configuring Apache & Nginx with Multiple PHP Versions #
# Apache will run on port 8080 and will be behind Nginx #
# Nginx will serve as a reverse proxy for Apache Sites #
# Nginx will act as the primary web and caching server #
########################################################################
# Update Packages
sudo apt update && sudo apt upgrade -y

Keybase proof

I hereby claim:

  • I am sheikhwaqas on github.
  • I am sheikhwaqas (https://keybase.io/sheikhwaqas) on keybase.
  • I have a public key ASAKmnco7goOktG8mZzZlAGmHelvaZu8joSYtU_C3Zem-go

To claim this, I am signing this object:

@sheikhwaqas
sheikhwaqas / P12toPEM.txt
Created October 10, 2018 11:55 — forked from shahdhiren/P12toPEM.txt
Convert P12 file for Push Notification to PEM format
Development Phase:
Step 1: Create Certificate .pem from Certificate .p12
Command: openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
Step 2: Create Key .pem from Key .p12
Command : openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12
Step 3: Optional (If you want to remove pass phrase asked in second step)
Command : openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem
@sheikhwaqas
sheikhwaqas / install-docker.sh
Created April 9, 2018 13:11
Install Docker & Docker-Compose on Ubuntu 16.04 LTS (Xenial). Run this file with sudo.
# Install Pre-requisites
apt update
apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt update
# Install Docker CE
apt install docker-ce -y
@sheikhwaqas
sheikhwaqas / docker-compose.yml
Last active October 3, 2022 14:40
Docker Compose configuration to run MySQL 5.6 and MySQL 5.7 on one instance. Create /var/lib/mysql56-data & /var/lib/mysql57-data with root as the owner of these directories before running docker-compose up -d
version: '3'
services:
mysql56:
image: mysql:5.6
restart: unless-stopped
container_name: mysql56-container
ports:
- "127.0.0.1:3356:3306"
environment:
MYSQL_ROOT_PASSWORD: rootPassword
@sheikhwaqas
sheikhwaqas / setup-lemp.sh
Last active July 31, 2020 14:08
Install the LEMP stack on Ubuntu 16.04 LTS with Composer, Ruby, Sass & Compass
###############################################################################
# Install nGinx and PHP 7 on Ubuntu 16.04 LTS
###############################################################################
# Install nGinx Server
apt install nginx
# Install PHP & and it's respective packages
apt install php-common php-fpm php-mysql php7.0-cli php7.0-common php7.0-fpm php7.0-json php7.0-mysql php7.0-opcache php7.0-readline php-bcmath php-bz2 php-calendar php-ctype php-curl php-date php-enchant php-gd php-intl php-mbstring php-mcrypt php-mongodb php-soap php-sqlite3 php-tidy php-xdebug php-xml php-xml-parser php-xml-rpc2 php-xml-serializer php-xml-svg php-xmlrpc php-zip