Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Farzad YZ farskid

🎯
Focusing
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
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
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)
View questions-for-your-interviewer.md

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 carl.vitullo@gmail.com

Onboarding and the workplace

https://blog.vcarl.com/interview-questions-onboarding-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
farskid / remove_tuxera.sh
Last active Jun 13, 2019 — forked from miguelmota/remove_tuxera.sh
Completely uninstall and remove Tuxera NTFS on MacOS (resets trial version)
View remove_tuxera.sh
sudo rm -rf /Applications/Tuxera\ Disk\ Manager.app
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
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
farskid / readme.md
Created Nov 27, 2018 — forked from dominictarr/readme.md
statement on event-stream compromise
View readme.md

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.

@broros

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
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) {
console.log(
@farskid
farskid / create_github_tag.sh
Created Oct 16, 2018 — forked from cliffparnitzky/create_github_tag.sh
Simple way to create a tag via git shell and push it to repo
View create_github_tag.sh
# creat a tag (more infos at: http://git-scm.com/book/de/ch2-12.html)
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.