Install @polkadot/api
npm package.
Set NODE_ADDR environment variable to "wss://node.ksm.genshiro.io" for Genshiro or "wss://node.pol.equilibrium.io" for Equilibrium.
Set MASTER_ADDR to your substrate address.
Run and see balances changes in log.
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
library(jsonlite) | |
# Get prices | |
url <- "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=dai,usd-coin,bitcoin,ethereum,polkadot,kusama,the-open-network,cosmos,tezos,1inch,moonbeam,ksm,aave,optimism,ethereum-name-service,gitcoin,maker,uniswap,acala-dollar-acala,binance-usd,hydradx,astar,tether" | |
data <- fromJSON(url) | |
token_data <- split(data, data$id) | |
# Define portfolio (collect token amounts from different sources in a list) | |
holdings <- list( | |
"bitcoin" = c(0.07), |
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
{ | |
"endpoint": "/users/{userID}", | |
"method": "POST", | |
"extra_config": { | |
"github.com/devopsfaith/krakend-cel": [ | |
{ | |
"check_expr": "req_params.UserID in JWT.roles" | |
}, | |
"github.com/devopsfaith/krakend-jose/validator": { | |
"alg": "RS256", |
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
FROM golang:alpine as builder | |
ENV GO111MODULE=off | |
ENV _PATH=github.com/foxcool/homework | |
ADD . /go/src/$_PATH | |
WORKDIR /go/src/$_PATH | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags "-X main.version=develop" -o /homework . | |
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
Client setup: | |
ip addr add dev tun0 172.23.23.2 (cjdns does it already) | |
ip route add dev tun0 172.23.23.0/24 | |
ip route add default via 172.23.23.1 | |
Make sure UDP peerings use the original gateway, e.g. your ISP: | |
ip route add 37.139.20.30 via 192.168.3.1 | |
ip route add 188.166.62.155 via 192.168.3.1 |
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
my $account = { $self->model('UserAccount')->search({ | |
'me.id' => $id, | |
'me.site_id' => $site->id, | |
}, { | |
prefetch => [qw/orders talks identities/], | |
})->first->get_inflated_columns() }; | |
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
#!/usr/bin/perl | |
use 5.010; | |
use strict; | |
use warnings; | |
# Загоняю текст в переменную для удобства | |
my $text = 'sfglkdshfjgdslfhjglkfghksdjlhgsdjkhgjsfjghskjfhgjf'; | |
# Cам рабочий код, который загоняет в массив символы | |
# по три, и в последний что осталось. |
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
[Foxcool@foxbook workspace]$ sudo cpanm -v http://cpan.metacpan.org/authors/id/A/AZ/AZAWAWI/Wx-Scintilla-0.34.tar.gz | |
cpanm (App::cpanminus) 1.4008 on perl 5.014002 built for i386-linux-thread-multi | |
Work directory is /root/.cpanm/work/1321820328.5277 | |
You have make /usr/bin/make | |
You have LWP 6.02 | |
You have /bin/tar: tar (GNU tar) 1.26 | |
Copyright (C) 2011 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. |
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
############################################################################## | |
# $URL: mishin.narod.ru $ | |
# $Date: 2011-02-17 20:53:20 +0300 (Mon, 14 Feb 2011) $ | |
# $Author: mishin nikolay $ | |
# $Revision: 1.02 $ | |
# $Source: table.pl $ | |
# $Description: read data from jira table $ | |
############################################################################## |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use CGI::Carp qw/fatalsToBrowser/; | |
use lib "."; | |
use LWP::UserAgent; | |
use HTTP::Cookies; |