View details here: https://gist.github.com/xynova/87beae35688476efb2ee290d3926f5bb
References:
View details here: https://gist.github.com/xynova/87beae35688476efb2ee290d3926f5bb
References:
package main | |
import ( | |
"crypto/ecdsa" | |
"crypto/sha256" | |
"encoding/hex" | |
"fmt" | |
"log" | |
"github.com/mr-tron/base58" |
# Read more about setting it up | |
# https://medium.com/@ljmocic/deploying-react-application-to-aws-s3-using-github-actions-85addacaeace | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: |
/// Import on the top of your project | |
import "github.com/ethereum/go-ethereum/crypto" | |
type ethHandlerResult struct { | |
Result string `json:"result"` | |
Error struct { | |
Code int64 `json:"code"` | |
Message string `json:"message"` | |
} `json:"error"` | |
} |
const infuraProjectID = "Write your infura projectID here" // https://infura.io/signup | |
const tokenContractAddress = "0xdac17f958d2ee523a2206206994597c13d831ec7" | |
const accountAddress = "0x757d576da3fba018b1bd9cdd05fa4ca0261792c8" | |
// Dependencies | |
const Web3 = require('web3'); | |
const web3 = new Web3() | |
const keccak_256 = require('js-sha3').keccak256 | |
const rp = require('request-promise') | |
const retry = require('async-retry') |
Updated 2025-05-31
[gomock][1] | [testify][2] + [mockery][3] | [mockio][4] | [minimock][5] | [moq][6] | |
---|---|---|---|---|---|
GitHub stars | [![s1]][1] | [![s2]][2] + [![s3]][3] | [![s4]][4] | [![s5]][5] | [![s6]][6] |
Latest release date | [![d1]][r1] | [![d2]][r2] + [![d3]][r3] | [![d4]][r4] | [![d5]][r5] | [![d6]][r6] |
Maintained | ✅ | ✅ | ✅ | ✅ | ✅ |
// npm install got, dotenv | |
const got = require('got'); | |
require('dotenv').config(); | |
const credentials = process.env.CONSUMER_TOKEN + ":" + process.env.CONSUMER_SECRET | |
const credentialsBase64Encoded = new Buffer.from(credentials).toString('base64'); | |
got({ | |
url: 'https://api.twitter.com/oauth2/token', | |
method:'POST', |
// Written by Arsham Arya | |
// I'm not sure it's the best way, | |
// So any contribution makes me and other readers happy :) | |
import pgPromise from "pg-promise"; | |
import Cursor from "pg-cursor"; | |
require("dotenv").config(); | |
const pgp = pgPromise(); |
-- Written by Arsham Arya | |
-- Any contribution makes readers happy. | |
INSERT INTO table_name (user_id, my_array_field) | |
VALUES (2233, array[112, 333]) | |
ON CONFLICT (user_id) DO | |
UPDATE SET my_array_field = array( | |
SELECT DISTINCT unnest(table_name.my_array_field || array[112, 333]) | |
) WHERE table_name.user_id = 2233; |
# Written by Arsham Arya | |
# I'm not sure it's the best way, | |
# So any contribution makes me and other readers happy :) | |
from psycopg2.pool import ThreadedConnectionPool | |
import config | |
_CONNECTION_POOL = None | |