Skip to content

Instantly share code, notes, and snippets.

View bkawk's full-sized avatar

Will Hill bkawk

  • Digital Dreams
  • Earth
View GitHub Profile
@bkawk
bkawk / v2
Created February 10, 2019 10:07
public class numberToString {
public static void main(String[] args) {
int input = 50 ;
String undred = "undred";
String[] endNumbers = {"", "one", "two", "three","four", "five", "six", "seven", "eight", "nine", "ten"};
String[] weirdTeens = {"", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"};
String[] overTwenty = {"", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"};
if (input <= 10) System.out.println(input + " " + endNumbers[input]);
if (input > 10 && input < 20) System.out.println(input + " " + weirdTeens[input - 10]);
if (input > 15) {
<svg viewBox="-1000 -1200 2000 2000" style="max-width: 750px;">
<g transform="rotate(-30)" fill="white" stroke="black">
<g class="grid">
<g transform="translate(-450,-260)">
<g class="r-axis-same">
<polygon points="100,0 50,-87 -50,-87 -100,-0 -50,87 50,87"></polygon>
<text transform="rotate(30)">
<tspan x="-52" y="-16" class="q-coord">-3</tspan>
<tspan x="44" y="-16" class="r-coord">0</tspan>
<tspan x="0" y="60" class="s-coord"></tspan>

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

// @version=4
n = 'Price Histogram 2 - @bkawk'
study(title=n, shorttitle=n)
s = input(title="Fast A", type=input.integer, defval=3, minval=1, maxval=200)
l = input(title="Slow A", type=input.integer, defval=45, minval=1, maxval=200)
sx = input(title="Fast B", type=input.integer, defval=13, minval=1, maxval=200)
lx = input(title="Slow B", type=input.integer, defval=65, minval=1, maxval=200)
m = input(title="Multiplier", type=input.integer, defval=100, minval=1, maxval=10000)
sm = input(title="Smoothing", type=input.integer, defval=1, minval=1, maxval=20)
st = input(title="Strength", type=input.integer, defval=60, minval=50, maxval=100)
@bkawk
bkawk / .env
Last active February 20, 2022 19:15
NEXT_PUBLIC_CHAIN_ID='0x29'
NEXT_PUBLIC_CHAIN_NAME='Telos EVM Testnet'
NEXT_PUBLIC_NATIVE_CURRENCY_NAME='Telos'
NEXT_PUBLIC_NATIVE_CURRENCY_SYMBOL='TLOS'
NEXT_PUBLIC_NATIVE_CURRENCY_DECIMALS=18
NEXT_PUBLIC_RPC_URLS='https://testnet.telos.net/evm'
NEXT_PUBLIC_BLOCK_EXPLORER_URLS='https://telos.net'