Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
currentWhen: 'foo bar'
});
@xtian
xtian / .editorconfig
Last active January 14, 2021 21:58
Rust .editorconfig
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*.rs]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
@xtian
xtian / 01_simple_case.ex
Last active August 16, 2017 15:54
Ecto errors_on helper that returns atoms instead of strings.
@doc """
Helper for returning list of errors in a struct when given certain data.
## Examples
Given a User schema that lists `:name` as a required field and validates
`:password` to be safe, it would return:
iex> errors_on(%User{}, %{})