Skip to content

Instantly share code, notes, and snippets.


Farzad YZ farskid

Block or report user

Report or block farskid

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
farskid / machine.js
Last active Sep 12, 2019
HSLZone logic using Finite state machines and Reactive statecharts
View machine.js
const zoneMachine = Machine(
id: "zoneMachine",
initial: "preparing",
context: { error: undefined, zone: undefined },
states: {
preparing: {
invoke: {
src: "detectLocationSupport",
id: "detectLocationSupport",
farskid / parse_dotenv.bash
Created Aug 19, 2019 — forked from judy2k/parse_dotenv.bash
Parse a .env (dotenv) file directly using BASH
View parse_dotenv.bash
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)

I bundled these up into groups and wrote some thoughts about why I ask them!

If these helped you, I'd love to hear about it!! I'm on twitter @vcarl_ or send me an email

Onboarding and the workplace

  • How long will it take to deploy my first change? To become productive? To understand the codebase?
  • What kind of equipment will I be provided? Will the company pay/reimburse me if I want something specific?
farskid /
Last active Jun 13, 2019 — forked from miguelmota/
Completely uninstall and remove Tuxera NTFS on MacOS (resets trial version)
sudo rm -rf /Applications/Tuxera\ Disk\
sudo rm -rf /Library/Application\ Support/Tuxera\ NTFS
sudo rm -rf /Library/Filesystems/fusefs_txantfs.fs
sudo rm -rf /Library/Filesystems/tuxera_ntfs.fs
farskid / concurrent.js
Last active May 21, 2019
Concurrent, Parallel and Sequential operations using Javascript Promise.
View concurrent.js
async function concurrent() {
const fetchA = A.fetch();
const fetchB = B.fetch();
const responseA = await fetchA;
const responseB = await fetchB;
return {a: responseA, b: responseB};
farskid /
Created Nov 27, 2018 — forked from dominictarr/
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.


otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

farskid / pdf-viewer.js
Created Nov 22, 2018
PDF reader in javascript
View pdf-viewer.js
async function pdfViewer(pdfSrc) {
let blob = await fetch(pdfSrc);
blob = fetched.blob();
const url = URL.createObjectURL(blob);
return <object data={url} type="application/pdf"></object>
View Live monitor memory usage using node.js
const os = require("os");
// install this custom module!!
const babar = require("babar");
function calculateFreeMemPercentage() {
return Number(((os.freemem * 100) / os.totalmem).toFixed(2));
function printChart(points) {
farskid /
Created Oct 16, 2018 — forked from cliffparnitzky/
Simple way to create a tag via git shell and push it to repo
# creat a tag (more infos at:
git tag -a 1.0.0 -m "Version 1.0.0"
git push origin 1.0.0
git tag -a 1.0.0.alpha1 -m "Version 1.0.0 alpha1"
git push origin 1.0.0.alpha1
# delete a tag
git tag -d 1.0.0
git push origin :refs/tags/1.0.0
You can’t perform that action at this time.