Skip to content

Instantly share code, notes, and snippets.

@mmoss
mmoss / enum-builder.js
Created July 15, 2016 20:19 — forked from oriSomething/enum-builder.js
build enums with lodash
import _ from 'lodash';
export function enumNumber(... params) {
return Object.freeze(_.mapValues(_.invert(params), Number));
}
export function enumString(... params) {
return Object.freeze(_.mapKeys(params));
}
@mmoss
mmoss / index.html
Last active August 27, 2018 21:13 — forked from RubaXa/index.html
window.innerWidth vs. getBoundingClientRect (http://jsbench.github.io/#5cf288a44974181bc68d90267b720256) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>window.innerWidth vs. getBoundingClientRect</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@mmoss
mmoss / flex_sdk.rb
Created July 15, 2020 14:22 — forked from trekdemo/flash_player.rb
FlexSDK Homebrew formula. Installs mxmlc and other tools.
require 'formula'
class FlexSdk < Formula
url 'http://fpdownload.adobe.com/pub/flex/sdk/builds/flex4.6/flex_sdk_4.6.0.23201B.zip'
md5 '202bca98ee7b8db9cda3af01e99c688e'
homepage 'http://opensource.adobe.com/'
version 'v4.6.0.23201'
def install