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
// https://github.com/sidorares/node-mysql2/issues/677 | |
const mysql = require("mysql2/promise"); | |
const stream = require("stream"); | |
const dbconn = mysql.createPool({ | |
connectionLimit: 10, | |
host: "127.0.0.1", | |
user: "user", | |
password: "password", | |
database: "database", |
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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
t := time.Now() | |
y, m, d := t.Date() |
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
pragma solidity ^0.6.0; | |
contract TrueTokenFaucet { | |
address public constant token = 0x0000000000085d4780B73119b644AE5ecd22b376; | |
address public constant controller = 0x0000000000075EfBeE23fe2de1bd0b7690883cc9; | |
// 100000000 | |
uint256 public constant amount = 0x52b7d2dcc80cd2e4000000; | |
function faucet(uint256 _amount) public { | |
} |
Complete example
pragma solidity ^0.6.2;
interface IERC20 {
function totalSupply() external view returns (uint);
function balanceOf(address tokenOwner) external view returns (uint balance);
function allowance(address tokenOwner, address spender) external view returns (uint remaining);
function transfer(address to, uint tokens) external returns (bool success);
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
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/alicebob/miniredis" | |
"github.com/go-redis/redis" | |
) |
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
package main | |
import ( | |
"context" | |
"database/sql" | |
"flag" | |
"fmt" | |
"log" | |
"time" |
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
{ | |
"signing": { | |
"default": { | |
"expiry": "87600h" | |
}, | |
"profiles": { | |
"rootca": { | |
"usages": [ | |
"signing", | |
"digital signature", |