Skip to content

Instantly share code, notes, and snippets.

View chb0github's full-sized avatar

Christian Bongiorno chb0github

View GitHub Profile
@chb0github
chb0github / sample.sql
Created February 29, 2024 20:51
sample sql code
This file has been truncated, but you can view the full file.
create table CHBO_TEMP
(
ISO_WEEK VARCHAR2(8),
FOR_DATE DATE,
POD VARCHAR2(64),
PILLAR VARCHAR2(24),
DEFINITION VARCHAR2(800),
TOTAL_RUN NUMBER,
SYSTEM_ERRORS NUMBER,
BUSINESS_ERRORS NUMBER,
@chb0github
chb0github / jiggler.sh
Last active October 17, 2022 22:32
a jiggler bash scripts
#!/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

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:

# 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

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
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

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;

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

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.