Quick summary of the recent deprecations that have been added.
- We can no longer use the
{{each}}
helper without usingin
oras
. For example:
// Not okay:
{{#each rules}}
// context is a single rule, which is confusing...
{{/each}}
allRules: function() { | |
var options = { | |
initialize: function(array, changeMeta, instanceMeta) { | |
console.log("initialize array: ", array); | |
return array; | |
}, | |
addedItem: function(array, item, changeMeta, instanceMeta) { | |
console.log("addedItem - item: ", item); | |
array.push(item); | |
return array; |
// This is what I would like to do... | |
////////////////////////////////////// | |
var OtherModel = DS.Model.extend({ | |
parent: DS.belongsTo('parent') | |
}); | |
var Parent = DS.Model.extend({ | |
child: DS.belongsTo('other_model'), | |
init: function() { | |
this._super(); |
// The following DependentRelationshipSaveMixin will undirty any associated models on save. | |
// These models have the `{ dependent: true }` flag set on their relation declaration. This is useful | |
// when using embedded relationships with the ember-data.dependent-relationships.js addon | |
// (https://gist.github.com/slindberg/8660986). | |
var commitAttributes = function(model) { | |
model._inFlightAttributes = model._attributes; | |
model._attributes = {}; | |
model.adapterWillCommit(); | |
return model; |
/* Using this function: | |
updateGraph: function() { | |
if (this.hasData()) { | |
this.$('.waiting-for-data').hide(); | |
d3.select(this.$()[0]) | |
.datum(this.get('data')) | |
.call(Artisan.graphing.scatterChart()); | |
} else { | |
this.$('.waiting-for-data').show(); |
Quick summary of the recent deprecations that have been added.
{{each}}
helper without using in
or as
. For example:// Not okay:
{{#each rules}}
// context is a single rule, which is confusing...
{{/each}}
// If using rails: Place the csrf_meta_tag helper in primary layout in the head tag: | |
// = csrf_meta_tag | |
// Initializer | |
// Include the CSRF Token in each ajax Request. | |
Ember.$.ajaxSetup({ | |
headers: { | |
'X-CSRF-Token': Ember.$('meta[name="csrf-token"]').attr('content') | |
} | |
}); |
# Pull all keys matching wildcard from your Replica so you're not using KEYS on your primary. | |
$ redis-cli -h $ELASTI_CACHE_REPLICA_URL KEYS "*WILDCARD*" > keys.txt | |
# For each key that has been collected, prepend the DEL command. | |
$ sed ':a;N;$!ba;s/\n/\n DEL /g' keys.txt > del_keys.txt | |
# Feed the new DEL commands into your primary. Run via nohup + background as deleting millions of keys can take hours. | |
$ nohup redis-cli -h $ELASTI_CACHE_URL < del_keys.txt & |
# Heavily inspired by: | |
# scout_statsd_rack -- https://github.com/scoutapp/scout_statsd_rack/blob/master/lib/scout_statsd_rack.rb | |
# trashed -- https://github.com/basecamp/trashed | |
# Add to Rails App: `config.middleware.use RackStats` | |
class RackStats | |
attr_accessor :app | |
def initialize(app) | |
@app = app | |
end |
# path_sub, path_beg, path_end are the ones I'll likely want to use again. | |
# ACL Docs: https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#7.1 | |
acl sync_req path_sub config_settings | |
redirect prefix https://artisantools.com if sync_req |