This file contains hidden or 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 hidden or 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 hidden or 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:17-alpine | |
LABEL maintainer="Jordan Gould <[email protected]>" | |
# Based on https://github.com/andreaswachowski/docker-postgres/blob/master/initdb.sh | |
# pg_jobmon 1.5.0 | |
# They never cut a release for 1.5.0 (https://github.com/omniti-labs/pg_jobmon/commit/b9d49e6d4603f2670b3a2d512c31fc7cd5e9a334) | |
ENV PG_JOBMON_VERSION=b9d49e6d4603f2670b3a2d512c31fc7cd5e9a334 | |
ENV PG_PARTMAN_VERSION=v5.2.4 | |
# Install pg_jobmon |
This file contains hidden or 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 hidden or 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) |