Skip to content

Instantly share code, notes, and snippets.

View mthadley's full-sized avatar
💾
Loading...

Michael Hadley mthadley

💾
Loading...
View GitHub Profile
#!/usr/bin/perl
# Hello World
use strict;
use warnings;
my @message = ("Hello"," ", "World","\n");
print for (@message);
__END__
renderUI: function() {
var instance = this,
templateNode = instance.get('templateNode'),
labelNode = instance.get('labelNode');
A.FormBuilderCheckBoxField.superclass.renderUI.apply(instance, arguments);
// labelNode.insert(templateNode, labelNode, 'before');
// Works, result is <input><label></label></input>
@mthadley
mthadley / portal-ext.properties
Created August 11, 2015 16:53
Mike's Portal Properties
theme.css.fast.load=false
theme.images.fast.load=false
javascript.fast.load=true
javascript.log.enabled=false
layout.template.cache.enabled=false
browser.launcher.url=
@mthadley
mthadley / .projections.json
Last active October 21, 2022 16:14
A configuration for using vim-projectionist with jest. I was looking for this but couldn't find it anywhere.
{
"**/__tests__/*.js": {
"alternate": "{}.js",
"type": "test"
},
"*.js": {
"alternate": "{dirname}/__tests__/{basename}.js",
"type": "source"
}
}
@mthadley
mthadley / update-repos.sh
Last active October 28, 2016 12:32
Update Script, USE AT YOUR OWN PERIL
#!/usr/bin/env sh
#
# Pulls down changes in each Repo
#
read -r -d '' USAGE << 'END_USAGE'
usage: ./update-cloud.sh [-uh] [-g "gradle tasks"]
u : pull down master changes in each module
g : run gradle task in each folder
./update-cloud.sh -g "clean deploy"
h : print help
@mthadley
mthadley / Util.elm
Last active November 21, 2016 19:37
Elm Url
import Http exposing (encodeUri)
url : String -> List ( String, String ) -> String
url base =
let
encodeParts ( key, value ) =
(encodeUri key) ++ "=" ++ (encodeUri value)
in
(++) base << (++) "?" << String.join "&" << List.map encodeParts
@mthadley
mthadley / test.js
Created December 6, 2016 01:44
concat vs union
const {OrderedSet} = Immutable;
const x = OrderedSet([]);
const y = OrderedSet([2, 3, 4, 5, 6]);
const z = x.concat(y);
console.log(z === y);
// This will log `false`.
module Parser exposing (..)
import Combine exposing (..)
import Combine.Char exposing (char)
import Combine.Num exposing (int)
type Program
= Program Expr
// Type Defs
declare namespace JSX {
interface ElementAttributesProperty {
props;
}
}
interface ConfigAttr<T> {
valueFn: () => T;
{namespace MyComponent}
{template .render}
{@param attributes: attributes}
<button {$attributes}>Hello World</button>
{/template}
/* Caller Side */