Skip to content

Instantly share code, notes, and snippets.

aderchox / promisifying.js
Last active October 11, 2022 08:04
Promisification Quick Example
// 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 August 30, 2022 06:39
karel the robot add fast problem solution
void addFast(){
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 November 29, 2021 18:42
IRC Quick Guide (with Irssi terminal client)
====== 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 February 7, 2021 13:21
Visual Studio Code Settings Sync Gist