Skip to content

Instantly share code, notes, and snippets.

@jgwhite
jgwhite / example.js
Last active January 13, 2016 15:04
Ember-cli Initializer Example
// app/initializers/csrf.js
export default {
name: 'csrf',
initialize: function(container, app) {
app.inject('route', 'csrf', 'service:csrf');
app.inject('controller', 'csrf', 'service:csrf');
}
}
@krisselden
krisselden / index.hbs
Created April 25, 2014 06:01
sortable-list component example
{{#each fruits}}
{{this}}
{{/each}}
{{draggable-list values=fruits}}
/* jshint node: true */
/**
* This is a hack-ish way of triggering Karma runs on broccoli builds.
*/
var path = require('path');
var spawn = require('child_process').spawn;
var broccoli = require('broccoli');
function loadScript(module) {
var head = document.getElementsByTagName("head")[0];
var script = document.createElement("script");
return new RSVP.Promise(function(resolve, reject) {
script.language = "javascript";
script.src = module.url;
script.onload = function() {
resolve(module);
};
head.appendChild(script);
@joefiorini
joefiorini / structure.md
Last active August 29, 2015 13:57
eak-rails transition

Basically, it's a minimal Rails-API app (based loosely on this gist) embedded in an api folder in the root. Then the rest of it is a stock ember-cli setup. I don't know yet exactly how to make Rails look elsewhere for initializers, environments & locales, going to look into it.

api/              *.rb
  controllers/
  models/
  initializers/
  environments/
  locales/
  config.rb

routes.rb

@raytiley
raytiley / auth.js
Last active August 29, 2015 13:56
A controller using SimpleLogin from Firebase. Returns promises from login / logout to make working with Ember Routing simple.
var dbRef = new Firebase("https://YOUR-FIREBASE.firebaseio.com/");
export default Ember.Controller.extend({
/**
@property currentUser
@type {User}
@default null
*/
currentUser: null,
var compile = Ember.Handlebars.compile;
module('Ember.Test Unit Tests', {
setup: function() {
Ember.Test.setupUnitTest();
},
teardown: function() {
Ember.Test.teardownUnitTest();
}
});
@jvns
jvns / interview-questions.md
Last active April 17, 2025 16:25
A list of questions you could ask while interviewing

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".