This file contains hidden or 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
| /* eslint-disable no-console, arrow-body-style, quote-props, no-param-reassign */ | |
| const chokidar = require('chokidar'); | |
| const compileCSS = require('./css'); | |
| const cp = require('child_process'); | |
| const debounce = require('lodash/debounce'); | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const Promise = require('bluebird'); | |
| function run(cmd, args = []) { |
This file contains hidden or 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
| /** | |
| $ node --version | |
| v7.10.0 | |
| $ node arrben.js | |
| foreach 2294.22208 | |
| for 1342.5684099999999 | |
| */ | |
| const benchmark = (name, fn, n = 100) => { |
This file contains hidden or 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
| // Usage: `require('./webpack-proj4leaflet');` -- the code patches itself into L.Proj, as usual. | |
| import L from 'leaflet'; | |
| import proj4 from 'proj4'; | |
| L.Proj = {}; | |
| L.Proj._isProj4Obj = function (a) { | |
| return (typeof a.inverse !== 'undefined' && | |
| typeof a.forward !== 'undefined'); |
This file contains hidden or 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
| // usage: | |
| // import addProj4Leaflet from './byol-proj4leaflet'; | |
| // later ... ... | |
| // const L = require('leaflet'); | |
| // const proj4 = require('proj4'); | |
| // addProj4Leaflet(L, proj4); | |
| module.exports = (function (L, proj4) { | |
| if(proj4.__esModule && proj4.default) { | |
| proj4 = proj4.default; |
This file contains hidden or 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
| [('1615-node-2017', '1615-node-001'), ('1615-node-001', '1615-node-2017')] | |
| [('Accessor', 'Accessor_Singleton'), ('Accessor_Singleton', 'Accessor')] | |
| [('aglio-theme-api', 'aglio-fork'), ('aglio-fork', 'aglio-theme-api')] | |
| [('alicemodule01', 'alicemodule01')] | |
| [('ameya-shukla', 'ameya-shukla')] | |
| [('animate-css-styled-components', 'animate-css-styled-components')] | |
| [('arc-check', 'arc-object'), ('arc-object', 'arc-check')] | |
| [('art-build-configurator', 'art-build-configurator')] | |
| [('art-build-configurator', 'art-class-system'), ('art-class-system', 'art-build-configurator')] | |
| [('art-build-configurator', 'art-config'), ('art-config', 'art-build-configurator')] |
This file contains hidden or 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 crypto = require("crypto"); | |
| function gen( | |
| rand = Math.random, | |
| n = 10, | |
| alphabet = "abcdefghijklmnopqrstuvwxyz" | |
| ) { | |
| let p = ""; | |
| for (var i = 0; i < n; i++) | |
| p += alphabet[Math.floor(rand() * alphabet.length)]; |
This file contains hidden or 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
| import os | |
| import sys | |
| import argparse | |
| import shutil | |
| import traceback | |
| def process(path, interactive=False): | |
| if not interactive: | |
| print(path) |
This file contains hidden or 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
| function dumpLocalStorage() { | |
| return ( | |
| Object.keys(localStorage) | |
| .map((key) => [key, localStorage[key]]) | |
| .reduce((acc, [key, val]) => { acc[key] = val; return acc; }, {}) | |
| ); | |
| } | |
| function loadLocalStorageDump(dump) { | |
| if(typeof dump === 'string') dump = JSON.parse(dump); |
This file contains hidden or 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
| $ node index.js | |
| for: 1196073 hz | |
| every: 417669 hz | |
| Fastest is for | |
| $ |
This file contains hidden or 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
| SELECT file.version, COUNT(*) c | |
| FROM `the-psf.pypi.downloads201803*` | |
| WHERE file.project = 'babel' | |
| GROUP BY file.version | |
| ORDER BY c DESC | |
| --- | |
| $ tr ',' '\t' < results-20180403-200146.csv | expand | |
| version c |