Skip to content

Instantly share code, notes, and snippets.

@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
{"lastUpload":"2021-03-02T20:40:08.505Z","extensionVersion":"v3.4.3"}
@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 / 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 / templates.js.erb
Created March 20, 2012 00:56
Easy way of loading templates using icanhaz.js
!function(){
<% Dir.glob("#{Rails.root}/app/javascripts/templates/**/*.html.haml.mustache").each do |template| %>
ich.addTemplate(
"<%= File.basename template, '.html.haml.mustache' %>",
"<%= Haml::Engine.new(File.open(template, 'rb').read()).render.gsub(/\"/, '\\\"').gsub(/\n|[ ]{2,}/,'') %>"
);
<% end %>
}();
@mmoss
mmoss / AppBundle.py
Created March 7, 2011 04:35
SCons darwin build helpers based on scripts found here: https://github.com/hortont424/particles
#!/usr/bin/env python
from os.path import *
from SCons.Builder import *
from SCons.Script.SConscript import SConsEnvironment
def TOOL_APP_BUNDLE(env):
if env['PLATFORM'] != 'darwin':
return
@mmoss
mmoss / environment.plist
Created March 6, 2011 04:50
Create or edit ~/.MacOSX/environment.plist to fix issues with applications finding M2_HOME and M2 when installing Maven 3 via homebrew.
{
M2_HOME = "/usr/local/Cellar/maven/3.0.3/libexec";
M2 = "/usr/local/Cellar/maven/3.0.3/libexec/bin";
}