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:
| % git log --stat --author=dameninngenn --since="2011-07-15" --before="2011-08-15" --no-merges | grep 'files changed' | awk '{ins += $4}{del += $6} END{print "total: "ins"insertions(+) "del"deletions(-)"}' | |
| > total: 3385insertions(+) 1089deletions(-) |
| [ | |
| {name: 'Afghanistan', code: 'AF'}, | |
| {name: 'Åland Islands', code: 'AX'}, | |
| {name: 'Albania', code: 'AL'}, | |
| {name: 'Algeria', code: 'DZ'}, | |
| {name: 'American Samoa', code: 'AS'}, | |
| {name: 'AndorrA', code: 'AD'}, | |
| {name: 'Angola', code: 'AO'}, | |
| {name: 'Anguilla', code: 'AI'}, | |
| {name: 'Antarctica', code: 'AQ'}, |
| /* | |
| * window.Notification polyfill | |
| * @author Emilio Cobos (http://emiliocobos.net) | |
| */ | |
| /* try prefixed */ | |
| if( ! window.Notification ) { | |
| window.Notification = (function() { | |
| return window.Notification || window.webkitNotification || window.mozNotification || window.oNotification || window.msNotification; | |
| })() |
| app.directive('ngPlaceholder', function() { | |
| return { | |
| restrict: 'A', | |
| require: 'ngModel', | |
| link: function(scope, element, attr, ctrl) { | |
| var value; | |
| var placehold = function () { | |
| element.val(attr.placehold) |
| // Example usage: | |
| // deepPopulate(blogPost, "comments comments._creator comments._creator.blogposts", {sort:{title:-1}}, callback); | |
| // Note that the options get passed at *every* level! | |
| // Also note that you must populate the shallower documents before the deeper ones. | |
| function deepPopulate(doc, pathListString, options, callback) { | |
| var listOfPathsToPopulate = pathListString.split(" "); | |
| function doNext() { | |
| if (listOfPathsToPopulate.length == 0) { | |
| // Now all the things underneath the original doc should be populated. Thanks mongoose! | |
| callback(null,doc); |
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>| package com.badlogic.drop; | |
| import com.badlogic.gdx.Game; | |
| import com.badlogic.gdx.graphics.g2d.BitmapFont; | |
| import com.badlogic.gdx.graphics.g2d.SpriteBatch; | |
| public class Drop extends Game { | |
| SpriteBatch batch; | |
| BitmapFont font; |
| alert('hello ' + document.location.href); |