WWDC 2001 2002 2003 2007 2008 2009 2010 2011 2012 2013 2014<
Discover gists
- First, you need to open cmd in the admin mode, then run all commands below one by one.
- For x86 and x64
cd /d %ProgramFiles(x86)%\Microsoft Office\Office16
cd /d %ProgramFiles%\Microsoft Office\Office16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* @flow */ | |
/* Paste this into https://flow.org/try/ to see the bug: */ | |
const f = (lut: ?{[key: string]: number}): number => { | |
// This correctly notices that we're doing a null check on lut: | |
const testKey = 'fizz' | |
const y = (lut != null) ? lut[testKey] : 0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Register { | |
constructor() { | |
this.routes = [] | |
} | |
regist(obj, k, fn) { | |
const _i = this.routes.find(function(el) { | |
if((el.key === k || el.key.toString() === k.toString()) | |
&& Object.is(el.obj, obj)) { | |
return el |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Register { | |
constructor() { | |
this.routes = [] | |
} | |
regist(obj, k, fn) { | |
const _i = this.routes.find(function(el) { | |
if((el.key === k || el.key.toString() === k.toString()) | |
&& Object.is(el.obj, obj)) { | |
return el |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ko = require('knockout'); | |
ko.components.register('simple-name', require('./components/simple-name/simple-name.js')); | |
ko.applyBindings({ userName: ko.observable() }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ko = require('knockout'); | |
ko.components.register('simple-name', require('./components/simple-name/simple-name.js')); | |
ko.applyBindings({ userName: ko.observable() }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const UglifyJS = require('uglify-js'); | |
var symbolTable = {}; | |
var binaryOperations = { | |
"+": (x, y) => x + y, | |
"-": (x, y) => x - y, | |
"*": (x, y) => x * y | |
} | |
var constexpr = new UglifyJS.TreeTransformer(null, function(node) { | |
if (node instanceof UglifyJS.AST_Binary) { |
Note: since version 0.1.1 of the module this now works in Windows PowerShell or PowerShell Core.
- Download and install this version of Literation Mono Nerd Font which has been specifically fixed to be recognised as monospace on Windows:
(see this issue for more info: ryanoasis/nerd-fonts#269)
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
NewerOlder