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 { Airdrop } from '@solana-suite/airdrop'; | |
| import { | |
| Account, | |
| CompressedNft, | |
| Explorer, | |
| sleep, | |
| } from '@solana-suite/compressed-nft'; | |
| (async () => { | |
| const owner = Account.Keypair.create(); |
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 {Account, Memo} from '@solana-suite/core'; | |
| (async () => { | |
| const owner = Account.create(); | |
| await Account.requestAirdrop(owner.toPublicKey()); | |
| const sig = await Memo.create( | |
| 'solana suite memo test', | |
| owner.toPublicKey(), |
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 {Wallet} from "./src/"; | |
| (() => { | |
| console.log("start"); | |
| const starttime = Date.now(); | |
| let arr = []; | |
| while (true) { | |
| arr.push(Wallet.create()); | |
| if (arr.length == 500) { | |
| console.log(`${(Date.now() - starttime) / 1000}/sec`); |
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 Web3 = require('web3'); | |
| const web3 = new Web3('https://mainnet.infura.io/v3/1835809e0e6a4de38eaf1f7afb51e0ec'); | |
| const contractAddress = '0x34047D5d7F4C906998e0d9Def0d2Dc3B523d8398'; | |
| const abi = [ | |
| { | |
| "constant": true, | |
| "inputs": [ | |
| { |
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 { | |
| Keypair, | |
| Transaction, | |
| TransactionInstruction, | |
| PublicKey, | |
| Connection, | |
| sendAndConfirmTransaction, | |
| LAMPORTS_PER_SOL, | |
| } = require("@solana/web3.js"); |
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
| FROM ubuntu:20.04 as builder | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| RUN apt-get update | |
| RUN apt-get upgrade -y | |
| RUN apt-get install curl gnupg make g++ -y | |
| RUN curl -sL "https://keybase.io/crystal/pgp_keys.asc" | apt-key add - | |
| RUN echo "deb https://dist.crystal-lang.org/apt crystal main" | tee /etc/apt/sources.list.d/crystal.list | |
| RUN apt-get update |
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 StellarSdk = require('stellar-sdk'); | |
| const server = new StellarSdk.Server('https://horizon-testnet.stellar.org'); | |
| const pubkey = 'GC5OTOME3BSLOSH46OZ64HMIOKLKFSS2PQ5ULFD4J6LLFS7IHZQT4O76'; | |
| const secret = 'SBY37VIOJ7PN7LQBBPMTFTPIQXKHQW5X3RQQFMDXU2SUPQAYAHK5FJYU'; | |
| const destination = ''; | |
| (async () => { | |
| const account = await server.loadAccount(pubkey); | |
| const fee = await server.fetchBaseFee(); | |
| const timeout = await server.fetchTimebounds(10); |
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 React, {useState, useEffect} from 'react'; | |
| import {of, observable, interval} from 'rxjs'; | |
| import {map} from 'rxjs/operators'; | |
| import {ajax} from 'rxjs/ajax'; | |
| import './App.css'; | |
| const api = `https://randomuser.me/api/?results=5&seed=rx-react&nat=us&inc=name&noinfo`; | |
| const getName = user => `${user.name.first} ${user.name.last}`; |
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
| require "io" | |
| require "json" | |
| io = IO::Memory.new | |
| Process.run("cat ~/Work/hogepipe", shell: true, output: io) | |
| p data = io.to_s.chomp | |
| p JSON.parse(data)["name"] |
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 exec = require('child_process').exec; | |
| var obj = { | |
| "name":"太郎", | |
| "age": 30, | |
| "area":"Tokyo" | |
| } | |
| const json = JSON.stringify(JSON.stringify( obj )); | |
| console.log(json) |
NewerOlder