Skip to content

Instantly share code, notes, and snippets.

View ahmadawais's full-sized avatar
Building the LLM computing primitive at Langbase.com

Ahmad Awais ⌘ ahmadawais

Building the LLM computing primitive at Langbase.com
View GitHub Profile
@ahmadawais
ahmadawais / conference-mc-tips.md
Created October 9, 2019 16:42 — forked from philhawksworth/conference-mc-tips.md
Conference MC-ing tips

👀📎 It looks like you're preparing to MC a conference...

🚨 GIANT DISCLAIMER: This stuff is far from authoritative. But it's what I think works for me, and what I enjoy in an MC when I'm attending a conference.


Biggest tip - enjoy yourself.

@ahmadawais
ahmadawais / conference-mc-tips.md
Created October 9, 2019 16:42 — forked from philhawksworth/conference-mc-tips.md
Conference MC-ing tips

👀📎 It looks like you're preparing to MC a conference...

🚨 GIANT DISCLAIMER: This stuff is far from authoritative. But it's what I think works for me, and what I enjoy in an MC when I'm attending a conference.


Biggest tip - enjoy yourself.

@ahmadawais
ahmadawais / gist:6de8d779f15370a49a781ca10cebbd26
Created September 9, 2019 16:23 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

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

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@ahmadawais
ahmadawais / cloudinary-url-regex.js
Created August 27, 2019 09:45 — forked from baldurh/cloudinary-url-regex.js
A regex for capturing different parts of cloudinary urls
const CLOUDINARY_REGEX = /^.+\.cloudinary\.com\/(?:[^\/]+\/)(?:(image|video)\/)?(?:(upload|fetch)\/)?(?:(?:[^_/]+_[^,/]+,?)*\/)?(?:v(\d+|\w{1,2})\/)?([^\.^\s]+)(?:\.(.+))?$/;
const url = 'http://res.cloudinary.com/oz/image/upload/v1454951830/moments/musicreach/f3432155-1be9-4510-9c3a-c1672c21fc89/f5de39a0-7ad0-48de-b53b-1d148856bcb8_540_pv.jpg';
const matches = CLOUDINARY_REGEX.exec(url);
console.log(matches);
/*
[
'http://res.cloudinary.com/oz/image/upload/v1454951830/moments/musicreach/f3432155-1be9-4510-9c3a-c1672c21fc89/f5de39a0-7ad0-48de-b53b-1d148856bcb8_540_pv.jpg',
'image', // resource_type
'upload', // type
@ahmadawais
ahmadawais / VSCode Course Marketing Material.md
Last active August 24, 2019 16:46
VSCode Course Marketing Material

VSCode.pro Marketing Material

BADGES

Learn VSCode

[![Learn VSCode](https://img.shields.io/badge/-VSCODE.pro%20%E2%86%92-gray.svg?colorB=6A788D&style=flat)](https://VSCode.pro/)
@ahmadawais
ahmadawais / git-rename-files.md
Last active August 5, 2019 13:16
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 README.md read.md

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

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


Add Sub Domain on Zeit Now as an Alias