Skip to content

Instantly share code, notes, and snippets.

View CodeOfficer's full-sized avatar

Russell Jones CodeOfficer

View GitHub Profile
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"draw_minimap_border": true,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"highlight_line": true,
"ignored_packages":
[
"Vintage"
],
// A fix for the ember chrome extension so that we can peek into the data store
// see https://github.com/stefanpenner/ember-app-kit/issues/263#issuecomment-28482992
/* global require */
export default DS.DebugAdapter.reopen({
getModelTypes: function() {
var self = this;
return Ember.keys(requirejs._eak_seen).filter(function(key) {
return !!key.match(/^appkit\/models\//) && self.detect(require(key)['default']);
sessionInvalidationSucceeded: function() {
this.transitionTo(Ember.SimpleAuth.routeAfterInvalidation);
// unload all store data on logout
var store = this.container.lookup('store:main');
var typeMaps = store.get('typeMaps');
Ember.keys(typeMaps).forEach(function(type) {
var key = typeMaps[type].type;
store.unloadAll(key);
@CodeOfficer
CodeOfficer / validators.js
Created January 17, 2013 16:02
Validators for ember-data
var get = Ember.get;
DS.Model.reopen({
validate: function() {
if (get(this, 'isDeleted')) {
return;
}
get(this, 'validators').forEach(function(validator) {
validator.fn.call(this, validator.meta.key(this.constructor), get(this, validator.attribute), validator.options);
}, this);
var get = Ember.get;
DS.Model.reopen({
validate: function() {
if (get(this, 'isDeleted')) {
return;
}
get(this, 'validators').forEach(function(validator) {
validator.fn.call(this, validator.meta.key(this.constructor), get(this, validator.attribute), validator.options);
}, this);
@CodeOfficer
CodeOfficer / gist:4264600
Created December 12, 2012 03:19
mocha ember
require 'tests/support/test_helper'
describe "Ember Application", ->
application = null
beforeEach (done) ->
Ember.$("body").append "<div id='app'></div>"
Ember.run ->
application = Em.Application.create(rootElement: "#app", autoinit: false)
@CodeOfficer
CodeOfficer / gist:2411024
Created April 18, 2012 03:58
Fresh System Software
Xcode
Oh My ZSH
RVM
Janus
Homebrew
MacVim
KeyRemap4MacBook
@CodeOfficer
CodeOfficer / John's parts list.txt
Created April 14, 2012 19:33
Custom Parts List for Gaming Machine
Computer Hardware
KVM Switcher
4-port DualView Mini DisplayPort KVMP Switch with Peripheral Sharing
http://www.iogear.com/press/presskit/ces2012/GCS1924/GCS1924_Datasheet.pdf
DP to MDP Cable
Mini Displayport Female to Displayport Male Adapter Cable
http://estore.circuitassembly.com/products/Mini-Displayport-Female-to-Displayport-Male-Adapter-Cable.html
http://www.displayport.org/faq/
@CodeOfficer
CodeOfficer / ember-links.txt
Created March 29, 2012 00:15
Ember.js links
@CodeOfficer
CodeOfficer / gist:2205474
Created March 26, 2012 14:28 — forked from jeffkreeftmeijer/gist:1473018
PGError: ERROR: syntax error at or near "IDENTITY" (ActiveRecord::StatementInvalid)
Loading ["spec"]
*****************************************************************
DEPRECATION WARNING: you are using a deprecated constant that will
be removed from a future version of RSpec.
/Users/codeofficer/.rvm/gems/ruby-1.9.3-p125@worldbrain/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
* Rspec is deprecated.
* RSpec is the new top-level module in RSpec-2
*****************************************************************