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
var count = 0, | |
btnCount = document.getElementById('clicker'), | |
btnEnd = document.getElementById('ender'), | |
endO = Rx.Observable.fromEvent(btnEnd, 'click'); | |
function counter() { | |
console.log(++count); | |
} | |
function resultLogger() { | |
alert( |
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
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.0.0/rx.all.min.js"></script> | |
</head> | |
<body> | |
<h1>RxJs Click Counter</h1> | |
<button id="clicker">Increase Count</button> | |
<button id="ender">Unsubscribe from Click Stream</button> | |
<script> | |
var count = 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
app.on('ready', this.startMainWindow.bind(this)); |
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
var BrowsersManager = { | |
bindMtds: function() { | |
bindAll(this, | |
'setupReporters', | |
'setConfigs', | |
'setBrowsers', | |
'startMainWindow', | |
'loadClientApp', | |
'displayMainWindow', | |
'registerEvents', |
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
function bindAll(obj) { | |
for (var key, i = 1, length = arguments.length; i < length; i++) { | |
key = arguments[i]; | |
obj[key] = bind(obj[key], obj); | |
} | |
return obj; | |
} | |
function bind(func, ctx) { | |
var ctxArgs = Array.prototype.slice.call(arguments, 2); |
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
var underramdash = { | |
each: each, | |
map: map, | |
reduce: reduce, | |
filter: filter, | |
flatten: flatten, | |
uniq: uniq, | |
extend: extend, | |
every: every, | |
identity: identity |
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
# command | |
grep -n console.log example.js | |
# output | |
1: console.log(hey there); | |
8: console.log(msg); |
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
# command | |
sed -n '/console.log/{=;p;}' example.js | sed '{N;s/\n/ /}' | |
# output | |
1 console.log(hey there); | |
8 console.log(msg); |
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
# command | |
sed -n '/console.log/{=;p;}' example.js | |
# output | |
1 | |
console.log(hey there); | |
8 | |
console.log(msg); |
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
# command | |
sed -n '/console.log/'p example.js | |
# output | |
console.log(hey there); | |
console.log(msg); |
NewerOlder