Install the OpenSSL on Debian based systems
sudo apt-get install openssl
import requests | |
import base58 | |
import base64 | |
from pprint import pprint | |
ADDRESS = "T....your address" | |
PRIV_KEY = 'hex private key' | |
CONTRACT = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t" # USDT |
{ | |
"Comment": "A simple AWS Step Functions state machine that automates a call center support session.", | |
"StartAt": "ProcessTransaction", | |
"States": { | |
"ProcessTransaction": { | |
"Type" : "Choice", | |
"Choices": [ | |
{ | |
"Variable": "$.TransactionType", | |
"StringEquals": "PURCHASE", |
from jose import jwt | |
from jose.jwt import JWTClaimsError, JWTError, ExpiredSignatureError | |
from datetime import datetime, timedelta | |
import time | |
key = 'secret#%$sdfasdkflj@#%RFsaior82340-fweASDFSD928354940k' | |
expdelta = timedelta(seconds=10) | |
now = datetime.utcnow() | |
exp = now + expdelta |
# Rough Implementation of the pattern found here: https://medium.com/aws-activate-startup-blog/practical-vpc-design-8412e1a18dcc | |
provider "aws" { | |
region = "us-east-1" | |
} | |
# create a vpc | |
resource "aws_vpc" "shaselton" { | |
cidr_block = "10.0.0.0/16" | |
enable_dns_hostnames = true |
extension NSImage { | |
/// Returns the height of the current image. | |
var height: CGFloat { | |
return self.size.height | |
} | |
/// Returns the width of the current image. | |
var width: CGFloat { | |
return self.size.width |
# Pass the env-vars to MYCOMMAND | |
eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
# … or ... | |
# Export the vars in .env into your shell: | |
export $(egrep -v '^#' .env | xargs) |
<?php | |
// Define a constant to use with html emails | |
define("HTML_EMAIL_HEADERS", array('Content-Type: text/html; charset=UTF-8')); | |
// @email - Email address of the reciever | |
// @subject - Subject of the email | |
// @heading - Heading to place inside of the woocommerce template | |
// @message - Body content (can be HTML) | |
function send_email_woocommerce_style($email, $subject, $heading, $message) { |
// MARK: - Adding a header to a single request | |
func doRequestWithHeaders1() { | |
let headers: HTTPHeaders = [ | |
"X-Mashape-Key": MY_API_KEY, | |
"Accept": "application/json" | |
] | |
Alamofire.request("https://mashape-community-urban-dictionary.p.mashape.com/define?term=smh", headers: headers) | |
.responseJSON { response in | |
debugPrint(response) |