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
import { computed, signal } from '@angular/core'; | |
interface LoadingState<T> { | |
status: 'idle' | 'loading' | 'success' | 'error'; | |
data: T | null; | |
error: string | null; | |
} | |
class Loading<T> { | |
private readonly initialState: LoadingState<T> = { |
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
import { fileURLToPath } from 'url'; | |
import path from 'path'; | |
const filename = (url) => fileURLToPath(url); | |
const dirname = (url) => path.dirname(filename(url)); | |
function handleResponse(response) { | |
const formatResponse = ({ ok, status, statusText }, data) => { | |
const responseData = { | |
success: ok, |
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
import fetch from 'node-fetch'; | |
import { handleResponse, median } from './helper.util.js'; | |
function getRateDetails(currency, tradeType) { | |
let params = { | |
asset: 'USDT', | |
fiat: currency, | |
tradeType | |
}; | |
if (currency === 'USD') { |
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
/* Utilities */ | |
var RANDOM = function() {}; | |
function _randomInt(min, max) { | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} | |
function _randomHex(len) { | |
var hex = '0123456789abcdef'; |
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
function formatError(code, message) { | |
return { | |
code, | |
message, | |
}; | |
} | |
function handleResponse(response) { | |
const formatResponse = ({ ok, status, statusText }, data) => { | |
const responseData = { |
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 INDICATORS = { | |
'Recommend.Other': { title: 'Oscillators Rating' }, | |
'Recommend.All': { title: 'Technical Rating' }, | |
'Recommend.MA': { title: 'Moving Averages Rating' }, | |
RSI: { title: 'Relative Strength Index (14)' }, | |
'RSI[1]': null, | |
'Stoch.K': { title: 'Stochastic %K (14, 3, 3)' }, | |
'Stoch.D': { title: 'Stochastic %D (14, 3, 3)' }, | |
'Stoch.K[1]': null, | |
'Stoch.D[1]': null, |
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 INDICATORS = [ | |
'Recommend.Other', | |
'Recommend.All', | |
'Recommend.MA', | |
'RSI', | |
'RSI[1]', | |
'Stoch.K', | |
'Stoch.D', | |
'Stoch.K[1]', | |
'Stoch.D[1]', |
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
// Data Source: https://static.tradingview.com/static/bundles/embed/57226.e5f80e0c95e53007e6fe.js | |
const data = { | |
us: { | |
title: 'USA', | |
screenerName: 'america', | |
screenerTimezone: 'America/New_York', | |
defaultExchange: 'US', | |
exchangesForHotlist: ['AMEX', 'NASDAQ', 'NYSE', 'OTC', 'US'], | |
exchangesStocks: ['NASDAQ', 'NYSE', 'NYSE ARCA', 'OTC'], | |
group: 'North America' |
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
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove -y | |
apt-get -y install build-essential wget curl gcc make wget tzdata git libreadline-dev libncurses-dev libssl-dev zlib1g-dev | |
wget https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.34-9745-beta/softether-vpnserver-v4.34-9745-beta-2020.04.05-linux-x64-64bit.tar.gz | |
tar xzf softether-vpnserver-v4.34-9745-beta-2020.04.05-linux-x64-64bit.tar.gz && rm softether-vpnserver-v4.34-9745-beta-2020.04.05-linux-x64-64bit.tar.gz | |
cd vpnserver && sudo make | |
cd .. | |
sudo mv vpnserver /usr/local && cd /usr/local/vpnserver/ | |
sudo chmod 600 * |
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
{ | |
"com.netcore.app": true | |
} |
NewerOlder