Skip to content

Instantly share code, notes, and snippets.

View dwickern's full-sized avatar

Derek Wickern dwickern

View GitHub Profile
<label>
<Input @type="checkbox" @indeterminate={{true}}/>
working
</label>
<br>
<label>
<Input @type="checkbox" indeterminate={{true}}/>
not working
</label>
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
var _class;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineP
@dwickern
dwickern / bisect-log
Last active May 14, 2018 18:39
ember.js IE11 memory leak bisect
git bisect start
# bad: [5458d5181de25f86f913d5c222bfa5d0a0672ba4] fixup! [BUGFIX release] Fix SimpleHelper memory leak
git bisect bad 5458d5181de25f86f913d5c222bfa5d0a0672ba4
# good: [76b1af7bb842ed1f8284e2ed39042be09a247cc4] Release v2.18.2.
git bisect good 76b1af7bb842ed1f8284e2ed39042be09a247cc4
# good: [e0be9decd4b32a990eac9217efe47ffb2ef35077] Merge pull request #15698 from bekzod/peek-meta
git bisect good e0be9decd4b32a990eac9217efe47ffb2ef35077
# skip: [4ca15715e3abcb9460912481a53de3e8f3009945] Merge remote-tracking branch 'origin/master' into upgrade-glimmer
git bisect skip 4ca15715e3abcb9460912481a53de3e8f3009945
# good: [0e4c342271200d3ff6908124947433d7ecd7bb46] Merge pull request #16120 from emberjs/private-mutable-enumerable
@dwickern
dwickern / gist:6274289d30b54468787143a7fc2c61d7
Created January 24, 2018 19:19
Playframework dev server hang
Attaching to process ID 4656, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.112-b16f
Deadlock Detection:
No deadlocks found.
Thread 56619: (state = BLOCKED)
- java.lang.Thread.sleep(long) @bci=0 (Compiled frame; information may be imprecise)
@dwickern
dwickern / ember.d.ts
Created September 28, 2017 19:45
Typescript typings for ember.js v2.14.1 generated by https://github.com/typed-ember/ember-typings-generator
declare namespace Ember {
/**
* `getEngineParent` retrieves an engine instance's parent instance.
*/
function getEngineParent(engine: EngineInstance): EngineInstance;
/**
* Display a deprecation warning with the provided message and a stack trace
* (Chrome and Firefox only).
*/
function deprecate(message: string, test: boolean, options: {}): any;
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* This is a schema for responses in the JSON API format. For more, see http://jsonapi.org
*/
export type JsonApiSchema = (Success | Failure | Info);
@dwickern
dwickern / json-api.ts
Created August 28, 2017 19:18
JSON API schema (generated by NJsonSchema using typeStyle=interface)
/* tslint:disable */
//----------------------
// <auto-generated>
// Generated using the NSwag toolchain v11.3.5.0 (NJsonSchema v9.4.5.0) (http://NSwag.org)
// </auto-generated>
//----------------------
// ReSharper disable InconsistentNaming
export interface Success {
@dwickern
dwickern / .gitconfig
Created July 28, 2017 16:44 — forked from rambabusaravanan/.gitconfig
Git Diff and Merge Tool - IntelliJ
# Linux
# add the following to "~/.gitconfig" file
[merge]
tool = intellij
[mergetool "intellij"]
cmd = /usr/local/bin/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED")
trustExitCode = true
[diff]
@dwickern
dwickern / controllers.application.js
Created July 24, 2017 23:03
Ember.cacheFor + aliased property
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
aliased: Ember.computed.alias('appName'),
init() {
this._super(...arguments);
console.log('before:', this.cacheFor('aliased'));
console.log('get:', this.get('aliased'));
@dwickern
dwickern / Repeated.scala
Created February 16, 2017 18:33
Scalatest: run each test N times using a command-line argument
import org.scalatest._
sealed trait Repeated extends TestSuiteMixin { this: TestSuite =>
protected abstract override def runTest(testName: String, args: Args): Status = {
def run0(times: Int): Status = {
val status = super.runTest(testName, args)
if (times <= 1) status else status.thenRun(run0(times - 1))
}
run0(args.configMap.getWithDefault("times", "1").toInt)