Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env node
var Web3 = require('web3');
var web3 = new Web3();
function getBinarySize(string) {
return Buffer.byteLength(string, 'utf8');
}
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'));
#!/usr/bin/env node
var Web3 = require('web3');
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'));
var fromAddress = "0x9e9e6b41a1959325371fd9a8c47ad5b5d761dbe7";
// md5 hash of a file
#!/bin/bash
# jq is needed for this to work: https://stedolan.github.io/jq/
# full blob path to copy including SAS key
fromURL="https://stgacct.blob.core.windows.net/containername/filename?sv=YOUR_SAS_KEY"
# destination storage acct name
toAcctName="toStgAcct"
# destination storage acct SAS key
#[derive(Deserialize, Debug)]
struct GDAXMsg {
#[serde(rename="type")]
type_: MsgType,
time: String,
product_id: String,
sequen

Keybase proof

I hereby claim:

  • I am esell on github.
  • I am esell (https://keybase.io/esell) on keybase.
  • I have a public key ASCKW4jugW5g1nPffpIAcF86XmYVLt-17H6BNjNOfqxRbgo

To claim this, I am signing this object:

@esell
esell / createSPN.sh
Created July 21, 2016 19:38
generate required data for Service Principal based Azure service connection
#!/bin/bash
##################################################
# Bash script to replace the powershell script referenced at:
# https://blogs.msdn.microsoft.com/visualstudioalm/2015/10/04/automating-azure-resource-group-deployment-using-a-service-principal-in-visual-studio-online-buildrelease-management/
# Assumptions are:
# - you have the xplat CLI installed and are logged into the subscription
# - you have the jq tool installed
# - you don't value safe bash scripts :)
##################################################
response = client.describe_tags(
Filters=[
{
'Name': 'key',
'Values': [
val1,
]
},
{
'Name': 'key',