This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Without printing comptime argument or anytype. | |
const std = @import("std"); | |
const assert = std.debug.assert; | |
pub const Logger = ScopedLogger(null); | |
pub fn ScopedLogger(comptime maybe_scope: ?type) type { | |
return struct { | |
ptr: *anyopaque, | |
writeFn: *const fn (ptr: *anyopaque, buf: []const u8) void, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import subprocess | |
import datetime | |
import sys | |
import re | |
import csv | |
def format_timestamp(timestamp): | |
return timestamp.strftime("%d_%m_%Y_%H_%M_%S") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am dadepo on github. | |
* I am dadepo (https://keybase.io/dadepo) on keybase. | |
* I have a public key ASA1f_Nq0xFd20x2zwFYSey-OkIDcbDGbq7EFkjn9xwRago | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Axon dependencies in pom.xml | |
<dependency> | |
<groupId>org.axonframework</groupId> | |
<artifactId>axon-eventsourcing</artifactId> | |
<version>${axon.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>org.axonframework</groupId> | |
<artifactId>axon-modelling</artifactId> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.flink.api.common.typeinfo.TypeInformation | |
import org.apache.flink.streaming.api.scala.{DataStream, KeyedStream} | |
import org.apache.flink.streaming.api.scala._ | |
import shapeless._ | |
import record._ | |
import shapeless.LabelledGeneric | |
import shapeless.labelled.FieldType | |
import shapeless.Witness | |
import shapeless.ops.record.Selector | |
import shapeless.syntax.RecordOps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Chapter 4 of the Scala with Cats book (https://underscore.io/books/scala-with-cats/) has got | |
* an exercise regarding the Reader monad which is supposed to showcase the classic use case of Reader Monad: | |
* which is to build programs that accepts a configuration as parameter. | |
* | |
* The exercise can be summarised as follows. | |
* | |
* Given a DB configuration with the following shape: | |
* case class Db(usernames: Map[Int, String], passwords: Map[String, String]) | |
* where usernames is Map of userid to username |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/ | |
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin | |
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane | |