const { connect, keyStores } = require("near-api-js");
const path = require("path");
const homedir = require("os").homedir();
const nacl = require("tweetnacl");
const sha256 = require("js-sha256");
const ACCOUNT_ID = "near-example.testnet";
const CREDENTIALS_DIR = ".near-credentials";
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
'use strict'; | |
var elasticsearch = require('elasticsearch'); | |
var log = console.log.bind(console); | |
var client = new elasticsearch.Client({ | |
host: 'localhost:9200', | |
log: 'trace' | |
}); |
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
#!/bin/bash | |
################################### | |
# Usage: sudo ./installer.sh [os] # | |
################################### | |
OS=$1; | |
UBUNTU="ubuntu"; | |
############# |
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
// first install @solana "@solana/web3.js" | |
// yarn add @solana/web3.js | |
import { | |
Connection, | |
clusterApiUrl, | |
Keypair, | |
LAMPORTS_PER_SOL, | |
PublicKey, | |
} from '@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
const web3 = require('@solana/web3.js'); | |
const splToken = require('@solana/spl-token'); | |
(async () => { | |
//create connection to devnet | |
const connection = new web3.Connection(web3.clusterApiUrl("devnet")); | |
//generate keypair and airdrop 1000000000 Lamports (1 SOL) | |
const myKeypair = web3.Keypair.generate(); |
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
'use strict' | |
const autocannon = require('autocannon'); | |
let jsf = require('json-schema-faker'); | |
let schema = { | |
type: 'object', | |
properties: { | |
id: -1, | |
Info: { |
Download the package form Robo3t or using wget
wget https://download.robomongo.org/1.2.1/linux/robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz
tar -xvzf robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz
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
var start = new Date(2013, 5, 4) | |
var end = new Date(2013, 5, 6) | |
db.mention_stat.find({"verification": {"$gte": start, "$lt": end}}) |
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
var mention_id = 620996; | |
db.mentionStats.aggregate([ | |
{ $match: {'mention_id': mention_id}}, | |
{ $group: {'_id': { | |
'year': { '$year': "$verification_date" }, | |
'month': { '$month': "$verification_date" }, | |
'day': { '$dayOfMonth': "$verification_date" } | |
}, | |
'retweets': { $last: "$retweets" }}}, |
NewerOlder