Skip to content

Instantly share code, notes, and snippets.

aderchox / promisifying.js
Last active Oct 11, 2022
Promisification Quick Example
View promisifying.js
// This example illustrates how a synchronous method from the "fs" module could be promisified.
// Note that Node provides a built-in promisified fs module itself out of the box, and this snippet is just for illustration purposes.
const fs = require("fs");
// Non-promisified (async using callbacks, which can lead to callback hell... 👿🔥)
fs.readFile("./package.json", function callback(err, data) {
const package = JSON.parse(data.toString("utf8"));
aderchox / karel_addFast
Last active Aug 30, 2022
karel the robot add fast problem solution
View karel_addFast
void addFast(){
View DataTable.js
import React from 'react';
import DataTableField from './DataTableField.js';
import { groupBy } from './helpers';
class DataTable extends React.Component {
constructor(props) {
super(props); =;
this.categorizedData = groupBy(, "category");
aderchox / irc-quickstart.txt
Last active Nov 29, 2021
IRC Quick Guide (with Irssi terminal client)
View irc-quickstart.txt
====== IRC Intro: ======
An IRC Cheat Sheet:
In IRC, there are "Networks", and then each network is available on a "server" (usually on
multiple servers, but one of them is used more often, so we can simplify things by thinking of
networks and servers as one-to-one mappings), and then each network(server) has several "Channels".
"Users" connect to networks first, using "IRC clients"(e.g. Irssi, mIRC, etc.), and then join channels.
aderchox / cloudSettings
Last active Feb 7, 2021
Visual Studio Code Settings Sync Gist
View cloudSettings