Interactive support and resistance line rendering on a chart. Illustrating setting start end end points and horizontal line at full width.
This file contains hidden or 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
| #!/usr/bin/env bash | |
| sudo apt-get update && \ | |
| sudo sudo apt-get install -y git npm curl vim zsh build-essential unzip python-dev && \ | |
| mkdir "${HOME}/.npm-packages" \ | |
| \ | |
| sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" && \ | |
| curl -sL https://cdn.rawgit.com/zwhitchcox/crouton-clipboard/ed2b0303/install.sh | sh && \ | |
| curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash && \ | |
| curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - && \ |
This file contains hidden or 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 | |
| yum update -y | |
| yum install -y git zsh docker | |
| service docker start | |
| usermod -a -G docker ec2-user | |
| // Install nvm, node, and npm | |
| curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash | |
| . ~/.nvm/nvm.sh |
This file contains hidden or 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
| // api/stream.js | |
| import historyProvider from './historyProvider.js' | |
| // we use Socket.io client to connect to cryptocompare's socket.io stream | |
| var io = require('socket.io-client') | |
| var socket_url = 'wss://streamer.cryptocompare.com' | |
| var socket = io(socket_url) | |
| // keep track of subscriptions | |
| var _subs = [] | |
| export default { |
This file contains hidden or 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 fs = require("fs"); | |
| const { Tail } = require("tail"); | |
| const { EventEmitter } = require("events"); | |
| const JSON_FILE = "./theFile.json"; | |
| const controller = new EventEmitter(); | |
| const Services = {}; | |
| // controller.on("test", payload => console.log(`This is a test: ${payload}`)); |
This file contains hidden or 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
| /*eslint yoda: "error"*/ | |
| const youveBecome = "powerful"; | |
| if ("powerful" === youveBecome) { | |
| // yoda style | |
| // value comes before variable | |
| } | |
| if (youveBecome === "powerful") { | |
| // non-yoda |
This file contains hidden or 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 array = [1, 2, 3]; | |
| function sleep(nSeconds) { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(() => resolve(nSeconds), nSeconds * 1000); | |
| }); | |
| } | |
| async function run() { | |
| for (const interval of array) { |