using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
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 axios from 'axios'; | |
import store from "@/data/state" | |
class Http { | |
constructor() { | |
let service = axios.create({}); | |
service.interceptors.request.use((config) => { | |
config.headers.common['x-access-token'] = store.state.token | |
return config |
Create a simple nodejs hello world application
Add following Dockerfile
FROM node:8.10-alpine
MAINTAINER Koray Güclü
COPY . /var/www
Xubuntu VM Development Machine
Install OhMyZH as described here
Install silversearcher ag apt-get install silversearcher-ag
Install Mitmproxy by using this binary
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 Benchmark = require('benchmark'); | |
const axios = require('axios'); | |
const superagent = require('superagent'); | |
var suite = new Benchmark.Suite; | |
const targetUrl = 'http://httpbin.org/ip'; | |
suite | |
.add('axios', { |
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
wget -U "Mozilla/5.0 (X11; U; Linux; en-US; rv:1.9.1.16) Gecko/20110929 Firefox/3.5.16" --recursive --level=1 --no-clobber --page-requisites --html-extension --convert-links --no-parent --wait=3 --random-wait http://www.example.com/docs/interesting-part/ --domains=www.example.com |
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
Below is formula in Metastock for Autoenvelopes as discussed in Alexander Elder's books. Is it possible to convert them to bullscript? | |
thanks | |
Got this MS formula for the same thing from another web source. The parameters of this | |
look more closer to description in the book | |
EMA:=input("Base EMA", 22, 1, 100); | |
Factor:=input("Factor", 27, 1, 50); | |
avg:=ma(C,EMA,E); | |
csize:= Stdev(2*Max(Abs(H-avg) ,Abs(L-avg)) / avg,100)*Factor/10; {Use 100 days for stable channel size - default is 2.7 std} |
NewerOlder