Skip to content

Instantly share code, notes, and snippets.

const Tatum = require("@tatumio/tatum");
async function start() {
const btcWallet = await Tatum.generateWallet( Tatum.Currency.BTC, true);
console.log(btcWallet);
}
start();
@florindumitru
florindumitru / pula_widget.js
Last active May 26, 2021 18:29
Pula Widget iOS
//Widget PULA
const widget = new ListWidget()
const indexData = await fetchFngValue()
await createWidget()
// used for debugging if script runs inside the app
if (!config.runsInWidget) {
import * as tf from '@tensorflow/tfjs-node-gpu';
const csvUrl =
'https://storage.googleapis.com/tfjs-examples/multivariate-linear-regression/data/boston-housing-train.csv';
async function run() {
// We want to predict the column "medv", which represents a median value of
// a home (in $1000s), so we mark it as a label.
const csvDataset = tf.data.csv(
csvUrl, {
survived fare_class sex age fare
died first male 39 0
died first male 29 0
died first male 38 0
died first male 40 0
lived first male 49 0
died first male 30 0
died first male 38 0
died second male 34 0
died second male 28 0
@florindumitru
florindumitru / BottomCard.js
Created October 29, 2020 09:49
Swipeable React native Bottom Card
import * as React from 'react';
import {
Text,
View,
StyleSheet,
Animated,
PanResponder,
Easing,
} from 'react-native';
import { Dimensions } from 'react-native';
@florindumitru
florindumitru / - react native buttons
Last active October 24, 2020 10:52
Simple React native buttons (Flat and Raised)
Simple React Native Buttons
- Flat buttons
- Raised buttons
- Outline buttons
- Rounded buttons
Just copy qbuttons.js in your project !
stop
@florindumitru
florindumitru / Common-Currency.json
Created May 18, 2020 06:26 — forked from ksafranski/Common-Currency.json
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@florindumitru
florindumitru / registerParseInstallation.js
Created September 25, 2018 06:51
Registering a Parse Installation with React Native
// Not published on npm! use this fork https://github.com/gpbl/react-native-device-info
import DeviceInfo from "@gpbl/react-native-device-info";
const PARSE_URL = "https://api.parse.com/1/installations";
const PARSE_APP_ID = "YOUR_APP_ID";
const PARSE_REST_KEY = "YOUR_REST_KEY";
function registerParseInstallation(pushToken) {
@florindumitru
florindumitru / app.js
Created March 21, 2018 21:49
Run websocket (e.g socket.io) in pm2 cluster on multiple ports(for NGINX reverse proxy)
// run: pm2 start app.js -i max
var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
app.get('/', function(req, res){
res.send(process.env.NODE_APP_INSTANCE);
});