Skip to content

Instantly share code, notes, and snippets.

View Panman82's full-sized avatar

Ryan Panning Panman82

View GitHub Profile
@slindberg
slindberg / README.md
Last active July 27, 2022 09:22
Ember debug helpers intended to be used in the JavaScript console

Ember.Console

This is a set of helpers for finding the application's currently active models/routes/controllers/etc. This isn't a straightforward process because of how Ember (rightly) encapsulates application objects, but it's useful in debugging environments to be able to quickly access them. And with the beta release of Ember Data, the store is not easily accessible without helpers either.

Usage

All helpers can be called directly if you provide them an application instance:

@fny
fny / ember-console-helpers.js
Created July 10, 2014 15:43
Ember.js Console Helpers
// Initializer (be sure to change SomeGobal and YouAppName)
Ember.Application.initializer({
name: 'console',
initialize: function(container, application) {
return Ember.Console.injectHelpers(SomeGlobal, YourAppName);
}
});
//
@donnierayjones
donnierayjones / LICENSE
Last active June 24, 2024 14:28
Render Bootstrap as "small" layout when printing
Copyright (C) 2016 Donnie Ray Jones
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@mandiwise
mandiwise / Count lines in Git repo
Last active July 4, 2024 16:56
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
@danshultz
danshultz / patch-adapter.js
Created March 23, 2015 01:40
Ember Data Patch Support
import Ember from 'ember';
var get = Ember.get;
export default Ember.Mixin.create({
updateRecord: function (store, type, record) {
var data = {};
var serializer = store.serializerFor(type.typeKey);