Skip to content

Instantly share code, notes, and snippets.

View evanchooly's full-sized avatar

Justin Lee evanchooly

View GitHub Profile
BEGIN:VCALENDAR
PRODID:-//Justin Lee//Devnexus 2023//EN
NAME:Devnexus 2023
VERSION:1.1
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20230404T191554Z
DTSTART:20230404T090000
DTEND:20230404T103000
SUMMARY:Hands-on Workshop: Building Streaming Data Pipelines with Apache
BEGIN:VCALENDAR
PRODID:-//Justin Lee//Devnexus 2023//EN
NAME:Devnexus 2023
VERSION:1.1
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20230404T191554Z
DTSTART:20230404T090000
DTEND:20230404T103000
SUMMARY:Hands-on Workshop: Building Streaming Data Pipelines with Apache
Kotlin from the Ground Up
================================
* Files
* temp.kt
* obviously the starting point but a more robust compilation unit than in Java
* can contain bare functions, classes, objects, even properties
* Properties
* we'll start here because every things builds up from this
* *name* : *type*
@evanchooly
evanchooly / dailyprogrammer290.java
Created November 3, 2016 16:06 — forked from anonymous/dailyprogrammer290.java
reddit dailyprogrammer 290 2016-11-02
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* https://www.reddit.com/r/dailyprogrammer/comments/5as91q/20161102_challenge_290_intermediate_blinking_leds/ */
@evanchooly
evanchooly / IntegerListToArray.java
Created July 7, 2016 13:54
"how do I cast[sic] ArrayList<Integer> to int[] ? I've found toArray can only convert into Integer[]"
list.stream().mapToInt(i -> i.intValue()).toArray()
MongoClient client = MongoClients.create(MongoClientSettings.builder()
.clusterSettings(ClusterSettings.builder().hosts(Collections.singletonList(new ServerAddress("localhost"))).build())
.writeConcern(WriteConcern.UNACKNOWLEDGED).build());
System.out.println(client.getSettings().getWriteConcern());
client.getDatabase("test").getCollection("writeConcernTest").insertOne(new Document(), (result, t) -> System.out.println("DONE!"));
Thread.sleep(Long.MAX_VALUE);
public class WriteConcernTest {
public static void main(String[] args) throws InterruptedException {
MongoClient client = MongoClients.create();
System.out.println(client.getSettings().getWriteConcern());
client.getDatabase("test").getCollection("writeConcernTest").insertOne(new Document(), (result, t) -> System.out.println("DONE!"));
Thread.sleep(Long.MAX_VALUE);
}
### Keybase proof
I hereby claim:
* I am evanchooly on github.
* I am evanchooly (https://keybase.io/evanchooly) on keybase.
* I have a public key whose fingerprint is F6ED 714C AE5E 04DA 72EB AF52 B50B 4733 6F36 116A
To claim this, I am signing this object:
function pr() {
if [ $# -lt 1 ]
then
echo "Error! Missing Pull Request ID #."
else
git fetch origin refs/pull/$1/head:pull-request-$1;
git checkout pull-request-$1;
fi
}
#! /bin/sh
M=META-INF/MANIFEST.MF
mkdir tmp
cd tmp
cp ../$1 .
JAR=$1
jar xf ${JAR}