Skip to content

Instantly share code, notes, and snippets.

Avatar

Colten Jackson jazzyjackson

View GitHub Profile
View crack.js
function printOurSailor(allPublicKeys, candidatesSeed){
for(var candidateSeed of candidatesSeed){
let keychain = this.CryptoService.mnemonicToKeychain(candidateSeed)
let seedHex = this.CryptoService.keychainToSeedHex(keychain)
let privateKey = this.CryptoService.seedHexToPrivateKey(seedHex)
let publicKey = this.CryptoService.privateKeyToBitcloutPublicKey(privateKey, "mainnet")
if(allPublicKeys.has(publicKey)){
console.log("Our sailor is" + publicKey + " mnemonic: " + candidateSeed)
}
}
View sixes
bamboo
banana
banner
barely
barrel
basket
battle
cactus
camera
cancel
@jazzyjackson
jazzyjackson / cors.py
Created Apr 22, 2021 — forked from JosePedroDias/cors.py
mitmproxy CORS
View cors.py
# based on https://gist.github.com/jhass/652dd780d23c1e236ff913e8a2b77eb2
# http://jsbin.com/wonitaqode/edit?js,output
# mitmproxy -s cors.py
# mitmdump -s cors.py
from mitmproxy import http
def response(flow):
h = flow.request.headers
View bitclout-api-example.json
{
"ProfilesFound": [
{
"PublicKeyBase58Check": "BC1YLi6LpXTemAG8T9ptyWAkMywrjynwZcKjB5DkDXxrsG5kgAwAqxq",
"Username": "maebeam",
"Description": "buidling bitclout",
"ProfilePic": "data:image/jpeg;base64,/9j/2wCEAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDIBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAGQAZAMBIgACEQEDEQH/xAGiAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgsQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+gEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoLEQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APTqSlq
View advent_day2a.js
let input = [
"1-3 a: abcde",
"1-3 b: cdefg",
"2-9 c: ccccccccc"
]
// wrong
// function testpassword(line){
// let [_, lower, upper, char, password] = line.match(/^(\d+)-(\d+)\s(\w):\s(\w+)$/)
// console.log(line, {lower, upper, char, password})
View adventofcalendarday1_c.js
// Find the complement to each highest number and search the lower numbers for the complement
// So it could be recursive, given a sorted array, loop through it from the top down, handing the lower half of the list to yourself
// base case: I have 2 numbers to fill.
let goal = 2020
let list = [1721, 979, 366, 299, 675, 1456]
let [a,b] = findsum(list, goal, 2)
console.log(a, b, a + b, a * b)
// 1721 299 2020 514579
View adventofcalendarday1_b.js
// complement sum
// ask "what is the complement for x number" and then "Do I have it?"
let goal = 2020
let marbles = new Set([1721, 979, 366, 299, 675, 1456])
let complement
main:
for(var marble of marbles){
complement = goal - marble
if(marbles.has(complement)){
View adventofcalendarday1.js
// blackjack sum
// given a goal sum and a list of integers, find pairs that add up to the goal
// return their product
// worse-case quadratic, for each in the list, I check all possibilities from the bottom up
// start at the highest number, scan up from the bottom, as soon as I break my goal I exit
let goal = 2020
let bottomup = [1721, 979, 366, 299, 675, 1456].sort((a,b) => a - b) // sort from the largest to the smallest
let topdown = bottomup.slice().reverse()
View latticeclock.nb
Manipulate[Module[{
time = Time2Rotation[seconds],
origin = {0, 0},
minutenorm = 6, (* length of minute hand the long side of the matrix *)
hournorm = 4, (* the length of the hour hand the short side of the matrix *)
minutehand, hourhand,
xbasis, ybasis, pts
},
xbasis = {Cos[time["minutespin"]], Sin[time["minutespin"]]};
ybasis = {Cos[time["hourspin"]], Sin[time["hourspin"]]};
View covidexample.html
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<style>
body {
max-width: 800px;
margin: 0 auto;
}
h2 {
text-align: center;
}