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 / .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'
// @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)

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

<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>
@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) {
public class numberToString {
public static void main(String[] args) {
int input = 20 ;
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) {
@bkawk
bkawk / index.html
Created January 26, 2019 13:38
CSS Only Language Drop Down
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin - https://jsbin.com/qapatubitu/13/edit?html,css,output</title>
</head>
<body>
@bkawk
bkawk / .travis.yml
Created December 24, 2018 04:49
Deploy branches to different buckets
language: node_js
node_js:
- '10'
dist: trusty
sudo: required
addons:
firefox: latest
chrome: stable
cache:
directories:
@bkawk
bkawk / .travis.yml
Created December 24, 2018 04:29
deploy pwa to S3 via Travis
language: node_js
node_js:
- '10'
dist: trusty
sudo: required
addons:
firefox: latest
chrome: stable
cache:
directories:
@bkawk
bkawk / api server setup
Last active August 30, 2018 10:24
api server setup
CONNECT & UPDATE
=========================
ssh root@142.93.105.122
sudo apt-get update
UPDATE NODE
=========================
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs