(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.
docker logs nginx 2>&1 | grep "127." | |
# ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container |
app.config(function ($httpProvider) { | |
$httpProvider.interceptors.push( | |
function ($q, $timeout) { | |
return { | |
'response': function (response) { | |
var deferred = $q.defer(); | |
if (response.headers('content-type') == 'application/json') | |
$timeout(function() {deferred.resolve(response);}, 1000); | |
else |
# Initialize the scroll | |
page = es.search( | |
index = 'yourIndex', | |
doc_type = 'yourType', | |
scroll = '2m', | |
search_type = 'scan', | |
size = 1000, | |
body = { | |
# Your query's body | |
}) |
(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.
# coding: utf8 | |
import bdb | |
import sys | |
# borrowed from: https://gist.github.com/rctay/3169104 | |
def info(type, value, tb): | |
if (hasattr(sys, 'ps1') | |
or not sys.stdin.isatty() |