Skip to content

Instantly share code, notes, and snippets.

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,
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') {
@kyawswarthwin
kyawswarthwin / frida-spoof.js
Created March 8, 2024 10:34 — forked from jacopo-j/frida-spoof.js
Frida script to spoof and hide several Android identifiers
/* Utilities */
var RANDOM = function() {};
function _randomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function _randomHex(len) {
var hex = '0123456789abcdef';
@kyawswarthwin
kyawswarthwin / helper.util.ts
Created September 13, 2023 05:06
China LiFePO4 Battery QR Code Decoder
function formatError(code, message) {
return {
code,
message,
};
}
function handleResponse(response) {
const formatResponse = ({ ok, status, statusText }, data) => {
const responseData = {
@kyawswarthwin
kyawswarthwin / TradingView Indicator Compute
Created October 31, 2022 19:31
tradingview-indicator-compute.js
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,
@kyawswarthwin
kyawswarthwin / tradingview-indicator-title.js
Created October 31, 2022 17:17
TradingView Indicator Title
const INDICATORS = [
'Recommend.Other',
'Recommend.All',
'Recommend.MA',
'RSI',
'RSI[1]',
'Stoch.K',
'Stoch.D',
'Stoch.K[1]',
'Stoch.D[1]',
@kyawswarthwin
kyawswarthwin / tradingview-screener.js
Created October 28, 2022 13:12
TradingView Screener
// 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'
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 *
@kyawswarthwin
kyawswarthwin / isAlive
Last active September 13, 2023 05:04
{
"com.netcore.app": true
}
@kyawswarthwin
kyawswarthwin / cloudSettings
Last active September 17, 2019 15:39
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-09-17T10:09:18.510Z","extensionVersion":"v3.4.2"}