Skip to content

Instantly share code, notes, and snippets.

Avatar

James Herdman jherdman

View GitHub Profile
View coc-prettier-config-steps.md
  1. Start Neovim
  2. :CocConfig
  3. Paste the below:
{
  "coc.preferences.formatOnSaveFiletypes": ["javascript"],
  "prettier.requireConfig": true
}
View changeset_view.ex
defmodule RovrApiWeb.ChangesetView do
use RovrApiWeb, :view
@doc """
Traverses and translates changeset errors.
See `Ecto.Changeset.traverse_errors/2` and
`RovrApiWeb.ErrorHelpers.translate_error/1` for more details.
"""
def translate_errors(changeset) do
View controllers.application.js
import Controller from '@ember/controller';
import { equal, gt } from '@ember/object/computed';
export default Controller.extend({
init() {
this._super(...arguments);
this.cars = [];
this.set('counter', 0);
},
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
onChange() {
this.set('msg', 'i heard a change event');
},
},
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
});
View lasportiva-letter.text
Hello friends.
I'm writing today to tell you that my trusty friend, my La Sportiva Lady Solutions, have died. Last night the strap broke rendering the right shoe dead as a door knob. I've attached a picture in case you have a wall of hero shoes. It helped me through my first 7b, and was there for me throughout the past 9 months. I'm sure it'll be a fine addition next to Nalle's portrait.
See, the thing, though, is that I keep breaking that stupid wimpy strap. I've done this now on at least two other pairs of Solutions, and on two pairs of Futuras. At nearly $230 CAD a pop, I just can't justify it any more.
Have you seen the strap on the Evolv shoes (attached for your viewing pleasure)? Now those are straps. If I break one of these, I deserve a medal.
I'm writing to implore you to reconsider the strap design in 2019, as it's clear 2018's shoes are still using the same wimpy strap. Please, please, please! The shoes are basically perfect otherwise. Sensitive, snug, and readily available in my size.
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@jherdman
jherdman / components.range-element-spy.js
Created Feb 24, 2017
range elements report wrong initial value
View components.range-element-spy.js
import Ember from 'ember';
export default Ember.Component.extend({
didRender() {
let nativeValue = this.$('#native').val();
this.set('nativeValue', nativeValue);
let emberValue = this.$('#ember-helper').val();
this.set('emberValue', emberValue);
},
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
myCondition: true,
});
View register-upload-file.js
/* global Blob */
// put in tests/helpers
import Ember from 'ember';
const {
Test: {
registerAsyncHelper,
},
You can’t perform that action at this time.