Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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) {
@pangratz
pangratz / upload.js
Last active December 10, 2015 00:49 — forked from noiges/upload.js
$(function(){
$("#files").bind("change", handleFileSelection);
var dropzone = $("#dropzone");
dropzone.on("dragover",allowDrop);
dropzone.on("drop",drop);
});
function handleFileSelection(event){
upload(event.target.files);
}
<html>
<head>
<title>ToDo List</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style></style>
<title>CouchDB jQuery Examples</title>
<script src="script/jquery.js"></script>
<script src="script/handlebars.js"></script>
<script src="script/ember.js"></script>
<script src="script/ember-data.js"></script>

(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 / application.template.hbs
Last active October 15, 2015 14:40 — forked from chancancode/application.template.hbs
no more twiddle hax
<my-component zomg="such Angle Bracket component" />
@pangratz
pangratz / application.controller.js
Created January 28, 2016 19:08 — forked from jerel/application.controller.js
Ember unloadRecord doesn't remove observers
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
import DS from "ember-data";
export default DS.JSONAPIAdapter.extend({
urlForCreateRecord: function(type, snapshot) {
var url = this._super(...arguments);
var includes = snapshot.adapterOptions.includes;
if (includes) {
url += `?includes=${includes}`;
}
import Ember from 'ember';
import { server, json } from '../initializers/pretender';
server.map(function() {
this.get('/file-types/1', function() {
return json({
'file-types': [{
id: 1,
name: "GIF"
}]