ssh-keygen -t rsa -b 4096 -C "YOUR EMAIL ADDRESS"
- write ssh key to
~/.ssh/gcp-sstp-box
- also save the key to an encrypted location, e.g. Lastpass
gcloud config set project YOURGCPPROJECTNAME
gcloud config compute/region set europe-west1
(or wherever you wish to host it)gcloud config compute/zone set europe-west1-b
(or wherever)
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 web3 import Web3 | |
from eth_account import Account | |
import json | |
import string | |
import random | |
# import qrcode | |
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
#Requires AutoHotkey v2.0 | |
SendMode "Input" | |
$CapsLock:: | |
{ | |
CapsError := !KeyWait("CapsLock", "T0.5") | |
If CapsError { | |
if GetKeyState("CapsLock", "T") = 0 | |
SetCapsLockState("on") |
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.8.0; | |
interface IERC20 { | |
function transfer(address to, uint256 value) external returns (bool); | |
function transferFrom(address from, address to, uint256 value) external returns (bool); | |
function approve(address spender, uint256 value) external returns (bool); | |
function balanceOf(address account) external view returns (uint256); | |
function allowance(address owner, address spender) external view returns (uint256); | |
} |
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.8.0; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
// This contract is written in Solidity and is designed to receive USDT tokens and aggregate them into a single address. The contract constructor takes in three parameters: the USDT token address, the collection address where the tokens will be sent, and the threshold value for the minimum amount of tokens to be collected before they are sent to the collection address. | |
// The receiveUSDT function is used to receive USDT tokens from users. When a user calls this function and sends USDT tokens to the contract, the transferFrom function of the USDT token contract is used to transfer the tokens to the contract. The function then checks the current balance of USDT tokens held by the contract, and if the balance is greater than or equal to the threshold value, all the tokens are transferred to the collection address using the transfer function of the USDT token contract. | |
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 ( | |
"cryptodax/new-race-robot/exchange" | |
"cryptodax/new-race-robot/models" | |
"cryptodax/new-race-robot/utils" | |
"log" | |
"math" | |
"math/rand" | |
"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
#!/usr/local/env bash | |
# Register vultr.com with free credit https://www.vultr.com/?ref=9206731-8H | |
# Create vps | |
# Tested on Ubuntu 18.04, Debian 10.0 | |
# How to... | |
# 1. Save this file as softether-installer.sh | |
# 2. chmod +x softether-installer.sh | |
# 3. Run bash file | |
# > ./softether-installer.sh | |
# Or just |
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
// A function that returns a random number between 1 and 8 with a higher probability of being less than 2 | |
function biasedRandom() { | |
// Generate a random number between 0 and 1 | |
let r = Math.random(); | |
// If the number is less than 0.75, return a number between 1 and 2 | |
if (r < 0.75) { | |
return Math.floor(r * 2) + 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
<div id="app" v-cloak> | |
<header class="header-wrap"> | |
<div class="header-row flex-row flex-middle flex-space"> | |
<div class="if-small"> | |
<div class="form-input dark"> | |
<div class="push-right">🔎</div> | |
<input type="text" v-model="search" placeholder="Search token..." /> | |
</div> | |
</div> |
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
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.4.22 <0.8.0; | |
pragma experimental ABIEncoderV2; | |
contract Wallet { | |
address[] public approvers; | |
uint8 public quorum; | |
struct Transfer { |
NewerOlder