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
# This is a partial regex to split a redis log line | |
# It will parse | |
# Pid | |
# The role (X, C, S, or M - https://github.com/redis/redis/blob/unstable/src/server.c#L130) | |
# Time | |
# level (.,-,*,# which are LOG_DEBUG, LOG_INFO, LOG_NOTICE, LOG_WARNING respectively - https://github.com/redis/redis/blob/unstable/src/server.c#L104) | |
# Message | |
[PARSER] | |
Name redis |
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
// Rust Builder Pattern Example that does not comsume the builder | |
// I used this to make api client library requests | |
// I stuggled a bit to figure out that I needed the outer b life time | |
// to satisfy the lifetimes so I am leaving this here as reference | |
struct Client {} | |
struct Foo { | |
x: i32, | |
y: i32, |

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
FROM postgres:15-alpine | |
LABEL maintainer="Jordan Gould <[email protected]>" | |
# Based on https://github.com/andreaswachowski/docker-postgres/blob/master/initdb.sh | |
ENV PG_JOBMON_VERSION v1.4.1 | |
ENV PG_PARTMAN_VERSION v4.7.1 | |
# Install pg_jobmon | |
RUN set -ex \ | |
\ |
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 sys | |
list_of_lists = [] | |
for line in sys.stdin: | |
new_list = [int(elem) for elem in line.split()] | |
list_of_lists.append(new_list) |
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
object fibobject { | |
def fib(n: Int): Double ={ | |
@annotation.tailrec | |
def fibLocalFunc(n: Int, curr: Double,prev: Double): Double ={ | |
if(n<=0) curr | |
else fibLocalFunc(n-1,curr+prev, curr) |