Skip to content

Instantly share code, notes, and snippets.

Edutaining at

Ahmad Awais ⚡️ ahmadawais

Edutaining at
Block or report user

Report or block ahmadawais

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:6de8d779f15370a49a781ca10cebbd26

1. Clone your fork:

git clone

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://
git fetch upstream
ahmadawais / cloudinary-url-regex.js
Created Aug 27, 2019 — forked from baldurh/cloudinary-url-regex.js
A regex for capturing different parts of cloudinary urls
View cloudinary-url-regex.js
const CLOUDINARY_REGEX = /^.+\.cloudinary\.com\/(?:[^\/]+\/)(?:(image|video)\/)?(?:(upload|fetch)\/)?(?:(?:[^_/]+_[^,/]+,?)*\/)?(?:v(\d+|\w{1,2})\/)?([^\.^\s]+)(?:\.(.+))?$/;
const url = '';
const matches = CLOUDINARY_REGEX.exec(url);
'image', // resource_type
'upload', // type
ahmadawais / VSCode Course Marketing
Last active Aug 24, 2019
VSCode Course Marketing Material
View VSCode Course Marketing Marketing Material


Learn VSCode

[![Learn VSCode](](
ahmadawais /
Last active Aug 5, 2019
Rename files with git

Rename a file with git

Normal renamed files are ignored by git so you have to do it like this:

git mv

P.S. Sometimes you need --force param to make it work.

ahmadawais / zip.js
Last active Aug 1, 2019
Zip a directory with JavaScript in Node.js.
View zip.js
const fs = require('fs');
const archiver = require('archiver');
* Zip a directory.
* @param {String} src Source directory path.
* @param {String} dst Destination path +
module.exports = async (src, dst) => {
"ip": "",
"type": "ipv4",
"continent_code": "AS",
"continent_name": "Asia",
"country_code": "PK",
"country_name": "Pakistan",
"region_code": "05",
"region_name": "Sindh",
"city": "Karachi",
ahmadawais /
Created Jun 18, 2019
Add Sub Domain on Zeit Now as an Alias

Add Sub Domain on Zeit Now as an Alias

ahmadawais / parser.ts
Created Apr 19, 2019 — forked from MaxGabriel/parser.ts
Date parsing code
View parser.ts
import * as P from 'parsimmon'
import Day from '~/utils/Day'
import Month from '~/utils/Month'
const shortMonths = {
jan: 1,
feb: 2,
mar: 3,
apr: 4,
may: 5,
View github-usernames-list.js
* Get GitHub usernames that contributed in a file.
* @author AhmadAwais <>
* @since 2019-04-03
const usernames = [];
// Select the right data of anchor links and loop over it.
You can’t perform that action at this time.