Skip to content

Instantly share code, notes, and snippets.

View super3's full-sized avatar

Shawn Wilkinson super3

View GitHub Profile
@super3
super3 / bench.sh
Last active November 19, 2018 16:11
Raiden Benchmark Scripts
#!/bin/bash
echo "Start: `date +%m-%d-%Y\ %H:%M:%S\ %Z`.\n"
for i in `seq 1 $1`;
do
echo "\n\n$i/$1\n==========";
curl -i -X POST http://localhost:5001/api/1/payments/0x396764f15ed1467883A9a5B7D42AcFb788CD1826/0xBbE54C702A529DF85f2D412F8FC4012Ca0684ba3 -H 'Content-Type: application/json' --data-raw '{"amount": 1}'
done
echo "\nEnd: `date +%m-%d-%Y\ %H:%M:%S\ %Z`."
Use: https://medium.com/@dave_lunny/sane-github-labels-c5d2e6004b63
Source: https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues
@super3
super3 / updates.json
Created April 1, 2018 19:50
updates.json
{
"win32-x64-prod": {
"readme": "First release",
"update": "https://github.com/super3/zmine/releases/download/v0.1.0/zmine.Setup.0.1.0.exe",
"install": "https://github.com/super3/zmine/releases/download/v0.1.0/zmine.Setup.0.1.0.exe",
"version": "0.1.0"
}
}
@super3
super3 / payout.MD
Last active September 8, 2020 01:48
Storj Bridge Payout Formula

Payout Formula

paymentModelFunction = function(gbHours, telemReports, downloadedBytes) {
 gbHoursScaled =  (gbHours - mean(gbHours)) / sd(gbHours)
 telemReportsScaled =  (telemReports - mean(telemReports)) / sd(telemReports)
 downloadedBytesScaled = (downloadedBytes - mean(downloadedBytes)) / sd(downloadedBytes)
 
 basePayout = 10
 ghHourPayout = 12.2221 * gbHoursScaled
 telemReportsPayout = 0.1452 * telemReportsScaled
@super3
super3 / README.md
Created September 12, 2016 18:41
Storj Beach Size

beach-size

Because this script performs many factorials (and is poorly optimized), please consider your CPU before inputting large values

This is a quick-and-dirty script to describe the difficulty of locating a file on a distributed storage network without information regarding the locations of its shards. It computes the probability of locating all the shards of a file with a number of random non-repeating draws from a network containing a given number of shards.

This is a fairly simple application of a hypergeometric distribution. The population size (N) is the total number of shards on the network, the number of successes in the population (k) is the number of shards required to rebuild the file, the sample size (n) is the number of shards a searcher retrieves from the network, and the number of success of shards in the file (x) is equal to the number of shards in the file (i.e. all shards are required to rebuild the file).

The results

@super3
super3 / keybase.md
Last active June 30, 2016 13:58
keybase.md

Keybase proof

I hereby claim:

  • I am super3 on github.
  • I am super3 (https://keybase.io/super3) on keybase.
  • I have a public key whose fingerprint is 9F82 4B3D 9BC8 57C7 90E7 47DE FF55 B791 DAB0 D433

To claim this, I am signing this object:

@super3
super3 / gist:7173942
Last active February 24, 2017 08:31
Linux Quick Guide

Extract Emails from a File:

grep -E -o "\b[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+.[a-zA-Z0-9.-]+\b" data.txt | sort -u > emails.txt

@super3
super3 / gist:6802808
Created October 3, 2013 00:42
BitcoinTalk Payload
// file: header.js
/*
~* HACKED BY *~
~* THE HOLE SEEKERS *~
________________________â–„â–„â–„â–„â–„
______________________▄████░██
_____________________▐░░░░░░░█
____________________▐░░░░░░░░▐
@super3
super3 / gist:6802799
Last active April 4, 2018 14:48
BitcoinTalk HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="description" content="Crypto Currency Conference 2013 (Oct. 5th) Atlanta, GA" />
<meta name="robots" content="noindex" />
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="https://bitcointalk.org/Themes/default/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "https://bitcointalk.org/Themes/custom1";
var smf_images_url = "https://bitcointalk.org/Themes/custom1/images";
var smf_scripturl = "https://bitcointalk.org/index.php";
@super3
super3 / gist:6788272
Last active December 24, 2015 10:59
Bitcoin Data Archiver
import urllib
from time import sleep
from datetime import datetime
TIME_INTERVAL = 900 # 15 minutes
def pull_page(name, folder_name, file_ext, pull_url):
print("Pulling {0}...".format(name))
outfile = folder_name + "/" + folder_name + "_" + str(datetime.utcnow()).replace(' ', '_') + file_ext
urllib.urlretrieve(pull_url, filename=outfile)