Skip to content

Instantly share code, notes, and snippets.

View john-kurkowski's full-sized avatar

John Kurkowski john-kurkowski

View GitHub Profile
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Component.extend({
foo: '',
init() {
this._super(...arguments);
console.info(this.constructor, 'init', this.getProperties('foo', 'attrs.foo.value'));
},
import Ember from 'ember';
export default Ember.Controller.extend({
queryParams: ['foo'],
foo: ''
});
@john-kurkowski
john-kurkowski / override-test-adapter-exception-test.js
Created March 1, 2016 02:34
My answer to "How to test Ember error substate, with Ember CLI test runner?" http://stackoverflow.com/q/34074386/62269
import Ember from 'ember';
import moduleForAcceptance from '../helpers/module-for-acceptance';
import sinon from 'sinon';
const { Test } = Ember;
moduleForAcceptance('Acceptance | error', {
beforeEach() {
this.sandbox = sinon.sandbox.create();
@john-kurkowski
john-kurkowski / npm-version-with-custom-git-tag-description.zsh
Created February 28, 2016 02:50
`npm version` with custom Git tag description.
npm version patch | parallel -I % git tag % %^{} -f -a
@john-kurkowski
john-kurkowski / tags2vtags.py
Last active April 16, 2016 18:22
Copy SemVer tags without a "v" prefix to tags with the "v" prefix, e.g. 1.2.3 -> v1.2.3.
#!/usr/bin/env python
'''Copy SemVer tags without a "v" prefix to tags with the "v" prefix, e.g.
1.2.3 -> v1.2.3. Preserve tag author, date, & message.'''
import re
import subprocess
OLD_TAG_RE = re.compile(r'^\d+\.\d+')
{
"basePath": "/v2",
"definitions": {
"ApiResponse": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"message": {
#!/usr/bin/env python
'''Convert tags with no leading "v" to NPM's default tag format.'''
import re
import subprocess
OLD_TAG_RE = re.compile(r'^\d+\.\d+')
@john-kurkowski
john-kurkowski / Fault-Tolerance.md
Last active October 22, 2015 01:17 — forked from pixelhandler/Fault-Tolerance.md
Fault Tolerance: Software is ruining the human experience

Fault Tolerance: Software is Ruining the Human Experience

Mostly a rant on a few bad experiences that could have been prevented in real life if engineers did a good job instead of a good enough job. We have no oath to "Do no harm!" So, we take license to ship whatever. This is bad for humans.

Intro: Fault Tolerance and Bad Human Experiences

Pumping Up the Tires

  1. Wow look new technology, pumping up tires is way better now
  2. Not so much, they added software to the process, oops
@john-kurkowski
john-kurkowski / gist:03efc9860a2a0e463085
Created June 3, 2014 21:00
(╯°□°)╯︵ ┻━┻.scala
➜ scala
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
Welcome to Scala version 2.10.3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_21).
Type in expressions to have them evaluated.
Type :help for more information.
scala> case object Table extends Exception
defined module Table
scala> def ╯°□°╯┻┻ = throw Table