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:
// Converts an ArrayBuffer directly to base64, without any intermediate 'convert to string then | |
// use window.btoa' step. According to my tests, this appears to be a faster approach: | |
// http://jsperf.com/encoding-xhr-image-data/5 | |
/* | |
MIT LICENSE | |
Copyright 2011 Jon Leighton | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
Map.prototype.filter ( callbackfn [ , thisArg ] )
NOTE callbackfn should be a function that accepts three arguments. filter calls callbackfn once for each key/value pair present in the map object, in key insertion order, and returns a new filtered map. callbackfn is called only for keys of the map which actually exist; it is not called for keys that have been deleted from the map.
If a thisArg parameter is provided, it will be used as the this value for each invocation of callbackfn. If it is not provided, undefined is used instead.
callbackfn is called with three arguments: the value of the item, the key of the item, and the Map object being traversed.
filter does not directly mutate the object on which it is called but the object may be mutated by the calls to callbackfn.
Map.prototype.map ( callbackfn [ , thisArg ] )
The map method calls MapTransform
abstract operation passing this value as M, callbackfn, thisArg as is, and false as updateKey.
The length property of the map method is 1.
Map.prototype.mapEntries ( callbackfn [ , thisArg ] )
The mapEntries method calls MapTransform
abstract operation passing this value as M, callbackfn, thisArg as is, and true as updateKey.
The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.
However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on
var _ = require("lodash"); | |
var R = require("ramda"); | |
var companies = [ | |
{ name: "tw", since: 1993 }, | |
{ name: "pucrs", since: 1930 }, | |
{ name: "tw br", since: 2009 } | |
]; | |
var r1 = _(companies).chain() |
So basically FlowType doesn't know about CSS Modules, a really handy way of dealing with the plagues of CSS in codebases (global variables and dependency wackiness mainly).
What WebPack allows us to do is "require" CSS files and use their class names:
import styles from "my_styles.css";
import React from "react";
/** | |
* BEM Helper methods. Inspired by http://bit.ly/1QqAOhR. | |
* Provides mixins @block, @element and @modifier. | |
* Requires SassyLists and SassyStrings. | |
*/ | |
$bem-element-separator: '__'; | |
$bem-modifier-separator: '--'; | |
/** | |
* Return a list of all of the rules within the selector |
class Person { | |
@observable firstName = "Michel"; | |
@observable lastName = "Weststrate"; | |
@observable nickName; | |
@computed get fullName() { | |
return this.firstName + " " + this.lastName; | |
} | |
} |