Skip to content

Instantly share code, notes, and snippets.

View kbastani's full-sized avatar
💭
Coding

Kenny Bastani kbastani

💭
Coding
View GitHub Profile
@kbastani
kbastani / pinot-insert.sql
Created September 21, 2022 23:05
Pinot SQL Insert Example
INSERT INTO "baseballStats"
FROM FILE 's3://my-bucket/public_data_set/baseballStats/rawdata/'
OPTION(taskName=myTask-s3)
OPTION(input.fs.className=org.apache.pinot.plugin.filesystem.S3PinotFS)
OPTION(input.fs.prop.accessKey=my-key)
OPTION(input.fs.prop.secretKey=my-secret)
OPTION(input.fs.prop.region=us-west-2)
@kbastani
kbastani / 42.md
Last active April 6, 2022 21:17
42

(This is the transcript of a chat bot trained on Wikipedia around 2012)

Q: What is the first thought that comes to your mind when you wake up in the morning?

A: In Douglas Adams' popular comedy book, movie, television, and radio series The Hitchhiker's Guide to the Galaxy, the Answer to the Ultimate Question of Life, the Universe, and Everything is given the numeric solution "42", after seven and a half million years of calculation by a giant supercomputer called Deep Thought.

Q: How does a toddler think, when she cannot produce language herself, but does understand language others speak to her?

@kbastani
kbastani / keybase.md
Created October 2, 2018 01:16
keybase.md

Keybase proof

I hereby claim:

  • I am kbastani on github.
  • I am kbastani (https://keybase.io/kbastani) on keybase.
  • I have a public key ASDY5WBsVgYdDXHnPLnzvgJ7ZtIbPfuJd8VlbJ8yV08yAgo

To claim this, I am signing this object:

@kbastani
kbastani / cqrs-es-axon-cf.md
Created September 5, 2018 19:51
CQRS + ES Axon Cloud Foundry
@kbastani
kbastani / Aggregate.java
Last active January 21, 2019 12:11
Simpler KStream API Example: See KafkaController.java
public class Aggregate<T> implements Aggregator<Long, KafkaEvent, KafkaEvent> {
private final Class<T> clazz;
private final Aggregator<Long, T, T> aggregation;
public Aggregate(Class<T> clazz, Aggregator<Long, T, T> aggregation) {
this.clazz = clazz;
this.aggregation = aggregation;
}
@kbastani
kbastani / .block
Created June 3, 2017 01:34
Force-directed Graph Voronoi Sphere
license: gpl-3.0
@kbastani
kbastani / .block
Created June 3, 2017 01:31
Force-directed Graph Voronoi Diagram
license: gpl-3.0
VARIABLE clock
Init == clock \in {0, 1}
Tick == IF clock = 0 THEN clock' = 1 ELSE clock' = 0
Spec == Init /\ [][Tick]_<<clock>>
@kbastani
kbastani / mvnw-fix.sh
Last active April 9, 2024 15:59
Adds a settings.xml file to your Spring Boot maven wrapper
#!/usr/bin/env bash
# Secure workaround for https://issues.sonatype.org/browse/MVNCENTRAL-1369
# Navigate to the root of your Spring Boot project where a Maven wrapper is present and run this script
cd .mvn/wrapper
wget https://gist.githubusercontent.com/kbastani/d4b4c92969ec5a22681bb3daa4a80343/raw/f166086ef051369383b02dfb74317cd07b6f2c6e/settings.xml
cd ../../
./mvnw clean install -s .mvn/wrapper/settings.xml
package com.example;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class User {