Skip to content

Instantly share code, notes, and snippets.

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

Ahmad Awais ⌘ ahmadawais

Building the LLM computing primitive at
View GitHub Profile
ahmadawais / legacy-verified.csv
Created April 23, 2023 21:25 — forked from travisbrown/legacy-verified.csv
Twitter accounts with legacy verification on 4 April 2023 (see
We can't make this file beautiful and searchable because it's too large.
Twitter ID, Screen name, Followers
ahmadawais /
Created July 1, 2022 14:17
The best way to install Node.js on Mac
# Node.
brew install node
brew install n
n lts
brew uninstall node # Not needed anymore from brew.
npm i -g git-open
ahmadawais / Sendy NGNIX Config
Created May 27, 2022 14:35
Sendy NGNIX Config 2022

Bascially all you really need is this

location / {
		try_files $uri $uri/ $uri.html $uri.php$is_args$query_string;

But to be on the safe side I added everything below:

ahmadawais /
Last active May 6, 2024 13:02
Install Sendy on DigitalOcean 2022

You can open the Marketplace tab and search for the current LAMP stack.

We will use the LAMP stack on a Basic plan for 5$/month.

php -v

# if php 8 then
ahmadawais /
Created August 19, 2021 13:23 — forked from sindresorhus/
Pure ESM package

Pure ESM package

The package linked to from here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(;
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
ahmadawais / tailwind.config.js
Created January 4, 2021 17:02
Tailwind Text Decoration Color Utilities Plugin
const decoration = plugin(function ({ e, addUtilities, theme }) {
colors = theme('colors');
const decorationColors = Object.keys(colors).reduce((acc, key) => {
if (typeof colors[key] === 'string') {
return {
[`.decoration-${e(key)}`]: {
'text-decoration-color': colors[key],
ahmadawais /
Created December 5, 2020 01:05 — forked from kentcdodds/


I was poking around trying to figure out all the packages I have access to publish and got curious. So I write this little script to determine the download stats for all the packages I have publish access to.

Feel free to try it yourself. Just change the username passed to getUserDownloadStats.

By default, the stats are sorted by their average daily downloads (descending). That should give you an idea of the most "popular" package of a given user relative to how long that package has been around.

You can use it with npx like so:

ahmadawais / notion2blog.js
Created November 3, 2020 15:12 — forked from mayneyao/notion2blog.js > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = ""
const START_PAGE = ""
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
ahmadawais / no-follow-back-twitter.js
Created August 27, 2020 09:51
TWITTER: Remove the followers from twitter following tab to see the people who don't follow you back. Hacky as heck :P
document.querySelectorAll("div[role=\"button\"]").forEach(el => {
const follower = /Follows you/g.test(el.textContent);
follower && el.parentNode.parentNode.remove();