Skip to content

Instantly share code, notes, and snippets.

View sebv's full-sized avatar

seb vincent sebv

  • Sauce Labs
  • Taipei, Taiwan
View GitHub Profile
//@version=5
indicator(title="Momentum Papa Bear", timeframe="D", timeframe_gaps=true)
periods = array.new_int(0)
// array.push(periods, input.int(7, minval=1, title="Length"))
array.push(periods, input.int(21, minval=1, title="Length"))
array.push(periods, input.int(63, minval=1, title="Length"))
array.push(periods, input.int(126, minval=1, title="Length"))
mom(stock) =>
➜ ~ kubectl logs fluentd-elasticsearch-ip-172-20-0-155.us-west-2.compute.internal --namespace="kube-system"
2015-11-23 21:23:42 +0000 [warn]: /var/log/containers/kube-ui-v2-olc9w_kube-system_POD-3485c0d195ac7d201b2c7d02d66bd78c75afbbb308083091c3502f3efe22e444.log not found. Continuing without tailing it.
2015-11-23 21:23:42 +0000 [warn]: /var/log/containers/fluentd-elasticsearch-ip-172-20-0-155.us-west-2.compute.internal_kube-system_fluentd-elasticsearch-7d2ccc0210a06abeb78ad2c006c585e2575f50d2dd0ad225443827942ec4fceb.log not found. Continuing without tailing it.
2015-11-23 21:23:42 +0000 [warn]: /var/log/containers/fluentd-elasticsearch-ip-172-20-0-155.us-west-2.compute.internal_kube-system_POD-19d684b0ff7b6430da9a0eff37dca263732db060dabddec9a6a744ccde0be318.log not found. Continuing without tailing it.
2015-11-23 21:23:42 +0000 [warn]: /var/log/containers/kube-dns-v9-7u728_kube-system_POD-783952ac222de2857ace28a75200e22b614d2f972cf6f77e68ddbf35d8e07311.log not found. Continuing without tailing it.
2015-11
➜ cluster kubectl logs fluentd-elasticsearch-ip-172-20-0-214.us-west-2.compute.internal --namespace="kube-system" -f
2015-11-23 17:36:08 +0000 [warn]: /var/log/containers/kibana-logging-v1-qgn0l_kube-system_kibana-logging-3213639184def8d380df6e85c6ff4c9ef000f36d6da098db0cbf8a836137d039.log not found. Continuing without tailing it.
2015-11-23 17:36:08 +0000 [warn]: /var/log/containers/kube-ui-v2-d7rir_kube-system_kube-ui-e0b3148671db53161eeb55cc8cd796f1b2b281bae716149e1557ae1bddcd97e2.log not found. Continuing without tailing it.
2015-11-23 17:36:08 +0000 [warn]: /var/log/containers/kube-dns-v9-4g3jc_kube-system_kube2sky-b0606cdbff2745886564a69900c252bbaf1c9164650be0a7f4ab193638b503fe.log not found. Continuing without tailing it.
2015-11-23 17:36:08 +0000 [warn]: /var/log/containers/monitoring-influxdb-grafana-v2-0fa38_kube-system_POD-a8fcf70e91e8f20546298895642d441052c4c77ef03492c0f618e9c2512cc792.log not found. Continuing without tailing it.
2015-11-23 17:36:08 +0000 [warn]: /var/log/containers/elasticsear
@sebv
sebv / demo.js
Last active November 22, 2015 09:57
var B = require("bluebird");
var _ = require("lodash");
function run(concurrency) {
function log(id, msg) {
// only logging first 100
if(id <= 100) {
console.log(id + " -> " + msg);
}
v0.1.14
v0.1.15
v0.1.16
v0.1.17
v0.1.18
v0.1.19
v0.1.20
v0.1.21
v0.1.22
v0.1.23
import _fs from 'fs';
import assert from 'assert';
var B = require('bluebird');
let fs = {
open: B.promisify(_fs.open),
mkdir: B.promisify(_fs.mkdir),
exists: B.promisify(
function (path, done) {
_fs.exists (path, function (result) {
// delay helper, for some reason they left out the clearTimeout in the B implementation
var cancellableDelay = function (ms) {
var t;
return new B(function(resolve,reject) {
t = setTimeout(function() {
resolve();
}, ms);
}).cancellable()
.catch(B.CancellationError, function(e) {
clearTimeout(t);
require('colors');
var wd;
try {
wd = require('wd');
} catch( err ) {
wd = require('../../lib/main');
}
var browser = wd.promiseChainRemote();
2015-02-24 06:02:25:131 - info: Welcome to Appium v1.3.1 (REV 1160ce0)
2015-02-24 06:02:25:136 - info: Appium REST http interface listener started on 10.5.5.3:4723
2015-02-24 06:02:25:139 - info: [debug] Non-default server args: {"app":"/Users/any2many/Downloads/AcidSim 2.app","address":"10.5.5.3","sessionOverride":true,"noReset":true,"log":"/tmp/appium2.log","logTimestamp":true,"deviceName":"iPad 2","showSimulatorLog":true,"defaultCommandTimeout":7200}
2015-02-24 06:02:25:140 - warn: Deprecated server args: {"--show-sim-log":"use instead: --show-ios-log"}
2015-02-24 06:02:25:140 - info: Console LogLevel: debug
2015-02-24 06:02:25:140 - info: File LogLevel: debug
2015-02-24 06:02:25:214 - info: --> GET /wd/hub/status {}
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --command-timeout "7200" --platform-version "8.2" --platform-name "iOS" --app "/Users/johnryan/Library/Developer/Xcode/DerivedData/App-heiemxzjgbefsqgnvgxrbnwsuvyi/Build/Products/Debug-iphonesimulator/App.app" --udid "" --device-name "iPhone 6"
info: Welcome to Appium v1.3.7 (REV 72fbfaa116d3d9f6a862600ee99cf02f6d0e2182)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {"app":"/Users/johnryan/Library/Developer/Xcode/DerivedData/App-heiemxzjgbefsqgnvgxrbnwsuvyi/Build/Products/Debug-iphonesimulator/App.app","udid":"","deviceName":"iPhone 6","platformName":"iOS","platformVersion":"8.2","defaultCommandTimeout":7200}
info: Console LogLevel: debug
info: --> GET /wd/hub/status {}