Skip to content

Instantly share code, notes, and snippets.


Ahmed Fasih fasiha

View GitHub Profile
fasiha /
Created Jul 4, 2021
Unofficial lightly-edited transcript of BradyDale@twitter, lanalana@twitter, and virtuallylaw@twitter on the podcast episode, "💡💬 What actually are scams in the world of cryptocurrency?" and

Okay, hey, how's it going? My name is Brady Dale, and I am here with light bulb talks the podcast that I do every Tuesday and thursday night here on twitter spaces and then later shows up on the Space Cast network. We're here tonight to talk about scams—and scams and crypto.

Scams is one of those words that gets thrown around in crypto so much that it sort of stopped having any kind of real meaning, because it's—folks just say it when there's a project, they don't like, they call it a scam. And I think what they mean is "I don't think this thing is gonna work out" and that's fine, maybe it won't. But it doesn't mean it's a scam, it doesn't mean that it was done in bad faith, but as one of our guests tonight, Lana Swartz, a professor in Virginia and who studies communications and and who has studied crypto in particular and money more broadly, and how money is kind of a social network, wrote a book about it that I that I wrote about last year called "New Money: How many became Social". She does a good job of

fasiha /
Created Jun 24, 2021
Alphabetical list of named trans-Neptunian objects' names

In case you need an ASCII-alphabetical list of trans-Neptunian objects with non-numeric names, perhaps to use as the naming scheme for sprints?, please enjoy—

  • Albion
  • Alicanto
  • Altjira
  • Arawn
  • Arrokoth
  • Borasisi
  • Ceto
  • Chaos
fasiha /
Last active Jun 4, 2021
Breathing planet: 2020 NDVI edition

Download NDVI from NASA and make a mp4 animation

# Download a bunch of files. I manually generated this list of URLs from
curl -L -o 2020-01.png
curl -L -o 2020-02.png
curl -L -o 2020-03.png
curl -L -o 2020-04.png
curl -L -o 2020-05.png
curl -L -o 2020-06.png
curl -L -o 202
fasiha /
Last active Feb 27, 2021
iTerm2, Karabiner Elements, and Hammerspoon for new Mac


Setup for


First, install all three tools above. (Or just iTerm2 if you don't care about keyboard speedups; or just Karabiner Elements & Hammerspoon if you don't care about iTerm2).

Then clone this repository to your local computer: run this in Terminal:

fasiha /
Last active Feb 12, 2021
One of my favorite sections of Aaron Brown's "Financial risk management for dummies", chapter 4, on the three ways to look at markets

Looking at Financial Markets

Academics who study finance but don’t actually work in the field have developed two main views of financial markets:

  • Information aggregation: Economists tend to treat financial markets as mechanisms for evaluating information and using it to set prices, which in turn regulate economic activity.
  • Random walk: Finance professors tend to treat markets as random walks. In a random walk, future price movements don’t depend on past movements. The metaphor is a drunk person taking each step in a randomly chosen direction, as opposed to a sober person whose steps can be predicted by the path she’s on. Of course, these finance professors don’t deny that markets process information and set prices, but if today’s price incorporates everything known today, then the move to tomorrow’s price must be unpredictable, or random.

A third view of financial markets is seldom taught in universities, at least not in economics departments and business schools. This third view holds that financial


Antirez, creator of Redis, excellent C programmer and API designer, tweeted this: (the thread goes both up and down from this link, it'd be helpful to scroll up then read)

He says (paraphrasing) that

(0) while programming is many things to many people,

(1) to him, part of programming is being able to implement a bubble sort or selection sort (slow, quadratic algorithms that are rarely seen outside beginner courses) under pressure—in an interview or on the job,

fasiha / combinatorics.ts
Created Oct 30, 2020
JavaScript/TypeScript basic combinatorics generators/iterators—because I always forget how these work
View combinatorics.ts
function* range(start: number, end: number) {
for (; start <= end; ++start) { yield start; }
function last<T>(arr: T[]) { return arr[arr.length - 1]; }
export function* numericCombinations(n: number, r: number, loc: number[] = []): IterableIterator<number[]> {
const idx = loc.length;
if (idx === r) {
yield loc;
fasiha /
Last active Sep 27, 2020
Express.js and PouchDB-Server: demo for multi-database Express-controlled "auth" with URL-rewriting

Introduction via Stack Overflow question & answer


git clone THIS_GIST_URL pouch-demo
cd pouch-demo
mkdir databases
npm install
node server.js
fasiha / 1.txt
Created Sep 6, 2020
Ebieki 🦐🚉 path through Wanikani vocabulary
View 1.txt
## Path through radicals for vocabulary: one kanji/radical per lesson
一: Already known 一
日: Already known 日
十: Already known 十
目: Already known 目
田: Already known 田
中: Already known 中
口: Already known 口
人: Already known 人
二: Already known 二
for f in $@; do
d=`exiftool -dateFormat "%Y-%m-%d %H.%M.%S" -CreateDate "$f" | tail -n1 | cut -d: -f2- | sed 's/^ //'`;
b=$(basename "$f");
echo $final;
mv "$f" "$final"