This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
var data = "do shash'owania"; | |
var crypto = require('crypto'); | |
crypto.createHash('md5').update(data).digest("hex"); |
There are many (old) clients available:
The Google Analytics API is at v3 (at time of writing).
This example uses Google's Ruby API client to access Analytics. Use https://github.com/google/google-api-ruby-client (Google supported).
This is a simple way to spot check that the modified image in your git index is the image you actually want without having to leave the command line.
Example: http://i.imgur.com/RUenUcM.png
img-ascii-diff
somewhere (e.g. ~/bin/img-ascii-diff
).attributes
in ~/.config/git/attributes
.~/.gitconfig
and add the lines below, pointing to wherever you put img-ascii-diff
./* ----------------------------------------- * | |
Lazy List Implementation | |
* ----------------------------------------- */ | |
// Haskell-like infinite List, implemented with es6 generators | |
// Lazyness lets you do crazy stuff like | |
List.range(0, Infinity) | |
.drop(1000) | |
.map(n => -n) |
CertSimple just wrote a blog post arguing ES2017's async/await was the best thing to happen with JavaScript. I wholeheartedly agree.
In short, one of the (few?) good things about JavaScript used to be how well it handled asynchronous requests. This was mostly thanks to its Scheme-inherited implementation of functions and closures. That, though, was also one of its worst faults, because it led to the "callback hell", an seemingly unavoidable pattern that made highly asynchronous JS code almost unreadable. Many solutions attempted to solve that, but most failed. Promises almost did it, but failed too. Finally, async/await is here and, combined with Promises, it solves the problem for good. On this post, I'll explain why that is the case and trace a link between promises, async/await, the do-notation and monads.
First, let's illustrate the 3 styles by implementing
// Licensed under CC BY 4.0. | |
type $If<X: boolean, Then, Else = empty> = $Call< | |
& ((true, Then, Else) => Then) | |
& ((false, Then, Else) => Else), | |
X, | |
Then, | |
Else, | |
>; |
<html> | |
<head> | |
<title>Run parallel</title> | |
</head> | |
<body> | |
<script> | |
(async function() { | |
async function f1() { | |
return new Promise(res => { | |
setTimeout(() => { |
(async function() { | |
async function f1() { | |
return new Promise(res => { | |
setTimeout(() => { | |
res('1.1'); | |
}, 1000); | |
}); | |
} | |
async function f2() { |