Skip to content

Instantly share code, notes, and snippets.

View artburkart's full-sized avatar
💭
why

Arthur Burkart artburkart

💭
why
  • Presynce LLC
  • somewhere rainy, probably
View GitHub Profile
@artburkart
artburkart / comment_controller
Created October 15, 2014 02:56
saving multiple records in ember
// Using the underscore library to loop
comments = _.map(ids, function (id) {
return self.store.createRecord('comment', {
date: new Date(),
owner: id,
type: 'Mailed Notice'
});
});
comments.invoke('save');
@artburkart
artburkart / ember_initializer
Created August 29, 2014 02:24
deferReadiness() to load current user
/*
* This was the quickest way I could figure out how to load
* the authenticated user into the app. It would make more sense
* if I only made one query to the server for the authenticated user
* (I could put the user id into a hidden input and load it from there)
*/
App.initializer({
name: 'loadCurrentUser',
after: 'store',
@artburkart
artburkart / bs_tooltip_component
Last active August 29, 2015 14:05
ember with bootstrap tooltip
(function () {
'use strict';
/* Very simple integration, you can add more of the options to
* the component from the list in the 'Options' section of
* http://getbootstrap.com/javascript/#tooltips-usage
*
* Usage:
* <button type="button">{{#bs-tooltip title="tooltip text"}}Words{{/bs-tooltip}}</button>
*/
@artburkart
artburkart / .jshintrc
Last active August 29, 2015 14:04
my .jshintrc file
{
"undef": true,
"bitwise": true,
"eqeqeq": true,
"forin": true,
"freeze": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
@artburkart
artburkart / dog_breeds_lowercase.json
Created June 25, 2014 23:10
dog breeds in JSON form
[
"affenpinscher",
"afghan hound",
"afghan shepherd",
"aidi",
"airedale terrier",
"akbash",
"akita inu",
"alano español",
"alaskan klee kai",