If you have an issue comment / PR description on GitHub, it doesn't automatically get anchors / IDs that you could link to:
What I like to do is to add a visible #
character like this:
This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.
Convert .mov/.MP4 to .gif
As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.
This is not limited to developer, anyone has this need can use this method to convert the files.
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log
in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
/** | |
* ================== angular-ios9-uiwebview.patch.js v1.1.1 ================== | |
* | |
* This patch works around iOS9 UIWebView regression that causes infinite digest | |
* errors in Angular. | |
* | |
* The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular | |
* have the workaround baked in. | |
* | |
* To apply this patch load/bundle this file with your application and add a |
window._eventLog = (function(longTime, important) { | |
var eventLog = []; | |
eventLog.getLongEvents = function(time) { | |
time = time === undefined ? longTime : time; | |
return this.filter(function(el) { | |
return el.time > time; | |
}) | |
} | |
// Should we filter mousemove? |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
//Let's create the top of the tree, the PRODUCT | |
create (n1:PRODUCT {id:1}); | |
//Let's create 100 children of the PRODUCT, COST_GROUPS connected to the top of the tree | |
match (n1:PRODUCT {id:1}) | |
with range(1,100) as RANGE, n1 | |
foreach (r in RANGE | create (n2:COST_GROUP {id:r})-[:PART_OF {quantity:round(rand()*100)}]->(n1) ); | |
//for every COST_GROUP, let's connect 100 children at a 3rd level, the COST_TYPEs | |
match (n2:COST_GROUP) |
START
each keyword clauseON
a new line.camelCase
or snake_case
for node identifiers but be consistent.UPPER_CASE_AND_UNDERSCORES
.CamelCaseWithInitialCaps
.MATCH (clauses)-->(should)-->(always)-->(use)-->(parentheses)-->(around)-->(nodes)
var ngAppElem = angular.element(document.querySelector('[ng-app]') || document); | |
window.$injector = ngAppElem.injector(); | |
window.inject = $injector.invoke; | |
window.$rootScope = ngAppElem.scope(); | |
// getService('auth') will create a variable `auth` assigned to the service `auth`. | |
var getService = serviceName => | |
inject([serviceName, s => window[serviceName] = s]); |