Skip to content

Instantly share code, notes, and snippets.

View samosad's full-sized avatar

Aleksei Tabakman samosad

View GitHub Profile
@RubaXa
RubaXa / create-worker-pool.ts
Last active December 24, 2019 07:38
Worker Pool
function createWorkerPool<
A extends object,
E extends object,
R extends any,
>(size: number, init: () => E, worker: (args: A, env: E) => Promise<R>) {
const pool = [] as Array<{
args: A;
resolve: (promise: Promise<R>) => void
}>;
const units = [] as Array<{
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>data-init</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>add jquery</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: