Skip to content

Instantly share code, notes, and snippets.

@pangratz
pangratz / keybase.md
Created May 22, 2015 18:05
keybase.md

Keybase proof

I hereby claim:

  • I am pangratz on github.
  • I am pangratz (https://keybase.io/pangratz) on keybase.
  • I have a public key whose fingerprint is ED74 3330 DFE1 FB64 C6BB BAAB FDB1 218C EF20 16D6

To claim this, I am signing this object:

(Originally taken from the Skylight "almost daily" emails, written by Tom Dale)

It was a very busy week. We spent the first three days of the week digging deep into Glimmer performance. As we've been scrambling to bring the benefits of this brand new approach to rendering to the many existing Ember apps, we inadvertently added some performance regressions while adding backwards compatibility features.

We spent many hours staring at the profiler in Chrome, trying to figure out how to optimize Glimmer's rendering performance at both the micro and macro level.

One of the biggest improvements was minimizing the number of DOM manipulations for certain cases of re-rendering an each helper in Ember. You can see more of the specific details in the commit here: https://github.com/tildeio/htmlbars/commit/64be35ef03953d80cfe4434446a01dd483bba7b0

This definitely involved busting out some rusty Computer Science skills, but it's always fun to explore algorithms and

@pangratz
pangratz / LinzProviderTest.java
Created July 8, 2011 23:22
this is not the same id as shown in Oeffi on Android ...
public class LinzProviderTest extends TestCase {
private LinzProvider provider;
public void testAutocomplete() throws IOException {
List<Location> stations = provider.autocompleteStations("Schumpeter");
assertNotNull(stations);
assertEquals(1, stations.size());
Location schumpeter = stations.get(0);
@pangratz
pangratz / de.json
Created August 29, 2011 21:18 — forked from cramforce/de.json
lang.json
{
"locale": "de",
"text": {
"#authors": [
{
"name": "Malte Ubl",
"screen-name": "cramforce"
}
],
"tweet": {
@pangratz
pangratz / de_AT.json
Created August 29, 2011 21:04 — forked from cramforce/de.json
lang.json
// translation for austrian german, especially for the western, hillocky part (tyrol)
{
// maybe local de_AT_tyrol would fit better ...
"locale": "de_AT",
"text": {
"#authors": [
{
"name": "Malte Ubl",
"screen-name": "cramforce"
}
@pangratz
pangratz / app.js
Created May 28, 2012 19:16
Sample Ember.js app
App = Ember.Application.create();
@pangratz
pangratz / gist:3007220
Created June 27, 2012 22:17
Replace Undefined with string
//original ember version
Ember.getPath = function(root, path) {
var hasThis, isGlobal, ret;
// Helpers that operate with 'this' within an #each
if (path === '') {
return root;
}
if (!path && 'string'===typeof root) {
Dashboard.Router = Ember.Router.extend({
root: Ember.Route.extend({
index: Ember.Route.extend({
route: '/:username',
connectOutlets: function(router, context) {
router.set('userController.content', Dashboard.User.find(context.username));
},
index: Ember.Route.extend({
route: '/',
@pangratz
pangratz / gist:3197673
Created July 29, 2012 11:19
Usage of `controllers` property on a controller

A possible usage for the controllers property ...

App.AutoSuggestController = Ember.Controller.extend({
});
@pangratz
pangratz / adapters.application.js
Last active October 8, 2015 22:06
Ember-Data Starting RESTAdapter
import DS from 'ember-data';
export default DS.RESTAdapter.extend({
shouldReloadAll: function() {
return true;
}
});