Skip to content

Instantly share code, notes, and snippets.

Avatar

Christian Bongiorno chb0github

View GitHub Profile
@chb0github
chb0github / jiggler.sh
Last active October 17, 2022 22:32
a jiggler bash scripts
View jiggler.sh
#!/usr/bin/env bash
set -e
set -o pipefail
function jiggle() {
local bearer="${1:?You must supply a bearer token}"
local delay="${2:?You must supply a randomized delay upper bound}"
local urls=(
# add urls here to randomly select from
@chb0github
chb0github / FUNCTIONAL.md
Created November 28, 2020 17:44
Functionally generating an ID
View FUNCTIONAL.md

When it comes to giving an interview I don't believe in ridiculous brain-benders. You know the ones: how would you implement an NxN tic-tack-toe. I knew that one was ridiculous when my son wanted me to help him implement tic-tac-toe. I said to him "Well, that's great, but what about a 10x10 board?!" To which he quipped: "Dad, there is no such thing!" - So, yeah: I get asked to over-engineer things in interviews :)

I try to keep my interview questions grounded and based on my actual experiences or something I could see being a real problem. To that end, one day I stumbled on a question on codereview stackexchange. In that case, the problem was as follow:

View SimpleHTTPWithCU.py
# python -m SimpleHTTPPutServer 8080
import SimpleHTTPServer
import BaseHTTPServer
import uuid
class SputHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_PUT(self):
length = int(self.headers["Content-Length"])
path = self.translate_path(self.path)
@chb0github
chb0github / notes.md
Last active July 19, 2017 21:04
Delete me
View notes.md

Maven v Gradle

  • Gradle is definitely a functionally superior tool
  • Gradle is dramatically faster to build - small multi-modules builds this is insignificant
  • Many of Gradle's benefits are edge case or non-applicable
  • Gradle uses DSL and has a very steep learning curve.
  • DDL in maven means there is little question of what's expected
  • DSL requires constant hunting on the internet and inside code
  • Gradle uses Groovy which wil run java code but isn't Java - It's definitely it's own language
@chb0github
chb0github / blockchains
Last active July 14, 2017 01:02
Blockchain breakdown
View blockchains
Filecoin
----
This is a pretty cool idea because it has a profit mechanism built in and you essentially have a distributed file system (through replication) with the assurances of a blockchain. The upside is you get absolute data integrity and assurance. But, the price of storage in the cloud is nearly free. That price is good enough for small businesses. They just want to store their data and they put incredible confidence in AWS from a security perspective even though the tine-foil-hat crowd knows better.
Technically, the nature of the block chain is to keep ALL history for verification purposes. But, consider the heavily accessed nature of files. Although this paper doesn't mention how to deal with RUD operations on files, I can only assume they would be represented as incremental transactions in this block chain. A block chain of this design would become colossally large very quickly by simply recording what typically occurs on a file. Then, this also doesn't obviate the hording of the network nodes to
@chb0github
chb0github / kvj.md
Created June 16, 2017 20:52
Comparing Kotlin V Java
View kvj.md

First, the Java code:

package org.bongiorno;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
View keybase.md

Keybase proof

I hereby claim:

  • I am chb0github on github.
  • I am chb0keybase (https://keybase.io/chb0keybase) on keybase.
  • I have a public key ASDBI4Z1zGL5P5Tk3PZmgBtvUWEDDoATFi6gI70PDJ4UDwo

To claim this, I am signing this object:

@chb0github
chb0github / metrics.md
Last active September 23, 2016 18:22
Metrics System design
View metrics.md

UI Design

The ability to Choose from a multitude of related entities by domain space. For example:

  • In the last mile space routes will consist of drivers and specific packages
  • In middle mile and long haul, specific packages are not nearly as important as capacity utilization
  • In sortation, knowing when you had a bad sort or unsortable is what counts as well as who did it. In this model, a route is tangential
  • To support this, the service must provide a catalog of data schemas representing each of the domain spaces. eg.