(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.
// assumes you add a timestamp field to each record (see Firebase.ServerValue.TIMESTAMP) | |
// pros: fast and done server-side (less bandwidth, faster response), simple | |
// cons: a few bytes on each record for the timestamp | |
var ref = new Firebase(...); | |
ref.orderByChild('timestamp').startAt(Date.now()).on('child_added', function(snapshot) { | |
console.log('new record', snap.key()); | |
}); |
(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.
div.carousel-container { | |
} | |
div.carousel-container > * { | |
display: inline-block; | |
vertical-align: middle; | |
} | |
div.carousel-container > button { | |
color: transparent; | |
border: 0px; |
var a = ["sdfdf", "http://oooooolol"], | |
handleNetErr = function(e) { return e }; | |
Promise.all(fetch('sdfdsf').catch(handleNetErr), fetch('http://invalidurl').catch(handleNetErr)) | |
.then(function(sdf, invalid) { | |
console.log(sdf, invalid) // [Response, TypeError] | |
}) | |
.catch(function(err) { | |
console.log(err); | |
}) |
moment.locale('my-mm', { | |
months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'), | |
monthsShort: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'), | |
monthsParseExact: true, | |
weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသာပတေး_သောကြာ_စနေ'.split('_'), | |
weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_တေး_ကြာ_နေ'.split('_'), | |
weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_တေး_ကြာ_နေ'.split('_'), | |
weekdaysParseExact: true, | |
longDateFormat: { | |
LT: 'HH:mm', |
If you want to generate certificates manually follow up to the Create Certificate with OpenSSL
in the next section.
This is more recommended way of doing since you don't have to do the manual labour and
free from the risk of human error.
The solution is using auto-generate tool called mkcert
.
It is written in go and work perfectly fine on almost every OS with super easy commands.