Skip to content

Instantly share code, notes, and snippets.

/**
@func
log how long it takes to run a block of code
- for a supplied number of times
@warning
the supplied func runs in a loop
- so first make sure there are no log statements in the func
- either comment them out, or replace them with lMock...
- const l = s => undefined; //lMock
@toltarisa
toltarisa / shortcuts.md
Last active July 4, 2020 08:27
Basic vim shortcuts

Note: Before starting ,For executing any command, firstly ':' we must open the standard prompt with colon. After writing command we should executing command by pressing Enter

Quit Vim

  • q: quit
  • wq : save current file and quit.
  • q! : quit without saving the file.

Saving changes

  • w : save changes

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@dherman
dherman / realms-api.md
Last active September 7, 2024 17:42
ES6 Realms API

Notational Conventions

This section describes the conventions used here to describe type signatures.

A [T] is an array-like value (only ever used read-only in this API), i.e., one with an integer length and whose indexed properties from 0 to length - 1 are of type T.

A type T? should be read as T | undefined -- that is, an optional value that may be undefined.

Realms

@sentientwaffle
sentientwaffle / simple-tar.coffee
Created February 9, 2012 17:32
Node.js compress a directory with tar; and write it to a tmp dir.
###
Allow the user to download a file or a directory as a _.tar.gz_
compressed version.
###
fs = require "fs"
{exec} = require "child_process"
{resolve} = require "path"
# `callback` receives `(tarPath)`