Skip to content

Instantly share code, notes, and snippets.


Mathias Bynens mathiasbynens

View GitHub Profile
lhorie /
Last active Nov 11, 2019
What's the longest keyword sequence in Javascript?
ebidel / download_chrome41.js
Last active Apr 19, 2020
For when you need to test your site in Google Search (Chrome 41).
View download_chrome41.js
* Copyright 2018 Google Inc. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
ebidel / feature_detect_es_modules.js
Last active Feb 3, 2021
Feature detect ES modules: both static import and dynamic import()
View feature_detect_es_modules.js
Complete feature detection for ES modules. Covers:
1. Static import: import * from './foo.js';
2. Dynamic import(): import('./foo.js').then(module => {...});
Thanks to @_gsathya, @kevincennis, @rauschma, @malyw for the help.
addyosmani / sites.txt
Last active Dec 13, 2018
Sites using Webpack in production (BigQuery)
View sites.txt


mspaint.exe does not properly verify Dib data from the clipboard. Therefore we can craft some Dib data in the clipboard which e.g. suggests a size of 0x100 by 0x100 pixels and contains not more than the Dib header itself. So the acutal image data rendered by mspaint.exe is its own heap data =)


Run the following code in PowerShell:

$bytes = 40,0,0,0,0,1,0,0,0,1,0,0,1,0,24,0,0,0,0,0,136,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
chicoxyzzy /
Last active Aug 14, 2020
Installing Node Nightlies via nvm

You can install Node Nightlies/RCs via nvm using NVM_NODEJS_ORG_MIRROR environment variable.

Install latest Node RC


Install latest Node.js Nightly

cramforce / on-idle.js
Created Dec 7, 2016
Wrapper around requestIdleCallback to wait for a minimum work budget
View on-idle.js
* Delays calling the given function until the browser is notifying us
* about a certain minimum budget or the timeout is reached.
* @param {!Window} win
* @param {number} startTime When we started waiting for idle.
* @param {number} minimumTimeRemaining Minimum number of millis idle
* budget for callback to fire.
* @param {number} timeout in millis for callback to fire.
* @param {function()} fn Callback.
andreibosco /
Last active Apr 11, 2021
disable creative cloud startup on mac
View ItemTemplate_1471916269862.json
"success": true,
"itemTemplates": [
"badgeSettings": {
"badgeRank": 4,
"targets": [
anonymous / GAME_MASTER_POKEMON_v0_2.tsv
Created Jul 16, 2016
Pokemon from GAME_MASTER protobuf file v0.2 in a .tsv
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 27 columns, instead of 12. in line 2.
PkMn BaseStamina BaseAttack BaseDefense Type1 Type2 BaseCaptureRate BaseFleeRate CollisionRadiusM CollisionHeightM CollisionHeadRadiusM MovementType MovementTimerS JumpTimeS AttackTimerS QuickMoves CinematicMoves AnimTime Evolution EvolutionPips PokemonClass PokedexHeightM PokedexWeightKg HeightStdDev WeightStdDev FamilyId CandyToEvolve
1 90 126 126 HoloPokemonType.POKEMON_TYPE_GRASS HoloPokemonType.POKEMON_TYPE_POISON 0.1599999964237213 0.10000000149011612 0.3815000057220459 0.6539999842643738 0.27250000834465027 HoloPokemonMovementType.POKEMON_ENC_MOVEMENT_JUMP 10.0 1.149999976158142 29.0 d601dd01 5a3b76 6d56d53fdaac2a3f6d56d53f93a9ea3f0000000036ab0a403333b33fbfbbbb3f 02 HoloPokemonClass.POKEMON_CLASS_NORMAL 1 0.699999988079071 6.900000095367432 0.08749999850988388 0.862500011920929 HoloPokemonFamilyId.V0001_FAMILY_BULBASAUR 25
2 120 156 158 HoloPokemonType.POKEMON_TYPE_GRASS HoloPokemonType.POKEMON_TYPE_POISON 0.07999999821186066 0.07000000029802322 0.3187499940395355 0.637499988079071 0.2549999952316284 H