This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2017-05-10T07:21:12.905Z","extensionVersion":"v2.7.0"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const trigger = new Rx.Subject(); | |
const action = trigger.subscribe(() => { | |
console.log('Fire 🚀 !') | |
}); | |
// Somewhere else | |
trigger.next(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const stream = Rx.Observable.from([2, 4, 6, 8, 10, 12]); | |
stream | |
.map(x => x * 2) | |
.filter(x => x % 3 === 0) | |
.skip(1) | |
.subscribe( | |
(x) => { console.log(x); }, | |
(err) => { console.error(err); }, | |
() => { console.log('Cypher ?'); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const stream = Rx.Observable.from([1, 2, 3]); | |
stream.subscribe( | |
(x) => { console.log(x); }, | |
(err) => { console.error(err); }, | |
() => { console.log('Done 👍'); } | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const listStream = Rx.Observable.from([1, 2, 3]); | |
const timeStream = Rx.Observable.interval(1000); // 1000ms | |
const promiseStream = Rx.Observable.fromPromise(fetch('ip.jsontest.com')); | |
const mergedStreams = Rx.Observable.merge(listStream, timeStream); | |
const emptyStream = Rx.Observable.empty(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LASTDATE=$(git show -s --format=%ad `git rev-list --tags --max-count=1`) | |
echo $1 > VERSION | |
touch CHANGELOG.tmp | |
echo `date +"*$1* (%Y-%m-%d)"` >> CHANGELOG.tmp | |
COMMITS=`git log --pretty=format:" - %s (%h);" --since="$LASTDATE"` | |
index=0 | |
IFS=';' | |
for line in $COMMITS; do | |
read -r -p "$line [y/N] " response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import $ from 'jquery'; | |
const format = () => { | |
$('.btn').each((i, e) => { | |
const that = $(e); | |
that.addClass('btn-danger'); | |
}); | |
}; | |
export default format; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="gallery" class="gallery" itemscope itemtype="http://schema.org/ImageGallery"> | |
<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject"> | |
<a href="https://unsplash.it/1200/900/?image=695" data-caption="Sunset in the wheat field<br><em class='text-muted'>© Jordan McQueen</em>" data-width="1200" data-height="900" itemprop="contentUrl"> | |
<img src="https://unsplash.it/400/300/?image=695" itemprop="thumbnail" alt="Image description"> | |
</a> | |
</figure> | |
<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject"> | |
<a href="https://unsplash.it/1200/900/?image=675" data-caption="Mysterious ocean<br><em class='text-muted'>© Barn Images</em>" data-width="1200" data-height="900" itemprop="contentUrl"> | |
<img src="https://unsplash.it/400/300/?image=675" itemprop="thumbnail" alt="Image description"> | |
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('a').click(function(event){ | |
event.preventDefault(); | |
var $pswp = $('.pswp')[0], | |
options = { | |
index: $(this).parent('figure').index(), | |
bgOpacity: 0.85, | |
showHideOpacity: true | |
}; |