This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| var empty, get, set, | |
| __hasProp = {}.hasOwnProperty; | |
| get = Ember.get; | |
| set = Ember.set; | |
| empty = function(obj) { | |
| var key; | |
| for (key in obj) { | |
| if (!__hasProp.call(obj, key)) continue; |
| # remove any bad refs | |
| git remote prune origin | |
| # pipe into bash and auto-delete any branches that have been merged into master! | |
| git log master --pretty=format:'%d' | grep '^ (origin' | tr -d ' ()' | sed 's/origin\//git push origin :/' |
| // Override DS.Adapter.didFindQuery only so that we can change the | |
| // loader.populateArray function. Unfortunately, we can't just twiddle | |
| // the populateArray function and let _super do the work. A hook would be nice. | |
| didFindQuery: function(store, type, payload, recordArray) { | |
| var loader = DS.loaderFor(store); | |
| // ======================================== | |
| // Here's the only difference! | |
| // | |
| if (type.toString() === 'App.Photo') { |
| 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); |
// blogs.handlebars (and blogs/index.handlebars)
match("/blogs").to("blogs", function(match) {
// blogs/starred.handlebars
match("/starred").to("starred");
// blog.handlebars (and blog/index.handlebars)
match("/:blog_id").to("blog", function(match) {
// posts.handlebars (and posts/index.handlebars)Many existing JSON APIs are not consistent between types. As JSON endpoints grew organically and were built by different engineers at different times, the style in which records are represented can vary wildly.
Historically, we have asked adapter authors to rely on the fact that the type of record is
provided to all adapter hooks (either by passing a type argument, or by passing a record
Audio compression is used to reduce the dynamic range of a recording. Dynamic range is the difference between the loudest and softest parts of an audio signal. It was originally used to guard against defects when cutting wax and vinyl phonograph records, but generally became useful as a way of increasing the loudness of an audio recording without achieving distortion.
The goal of most compression applications is to increase the amplitude of the softest parts of a recording, without increasing the amplitude of the loudest parts.
Compressors generally all have the same conceptual parts. However, not all compressors present variable controls for all parts to the user. If you don't see all of your compressor's controls here, there's a chance it either has a fixed value (and no control), or is named something else:
| // get a Casper object. | |
| // See http://casperjs.org/ | |
| var casper = require('casper').create(); | |
| // this will be evaluated inside the context of the window. | |
| // See http://casperjs.org/api.html#casper.evaluate for notes on | |
| // the difference between casper's running environment and the | |
| // DOM environment of the loaded page. | |
| function testReporter(){ | |
| // casper is webkit, so we have good DOM methods. You're |
| var casper = require('casper').create(); | |
| var positions = []; | |
| var kw = 'JSON'; | |
| casper.start('http://phantomjs.org/', function() { | |
| var pageHeight = this.evaluate(function() { | |
| return document.body.scrollHeight; | |
| }); | |
| if (pageHeight < 1) { | |
| this.echo('no page height', 'ERROR').exit(); |