Luke Pezet

Little bit of this...little bit of that...

View the Project on GitHub

About Me

Software Engineer (Diplôme d’Ingénieur from France) with a Master’s Degree in Computer Science. Technology enthusiast with 20+ years of experience in developing software solutions in different industries like travel, education, and healthcare, in a startup environment.

I code software on my (really small) spare time to scratch an itch, learn something new, investigate new architectures and solutions, and give back to the open source community.

Projects

ProjectIcon ProjectIcon ProjectIcon United File Service (not open source)

Simple and secure way to exchange files, small and big. Pay only for what you need. The idea was to develop a production-grade serverless service around simple file drop with notifications and third party payment processing.

ProjectSnapshot

This service is available at unitedfileservice.com.

ProjectIcon ProjectIcon ProjectIcon ETL-JS / ETL-JS-CLI

Extract, Transform, and Load sharable and repeatable from command line. The idea came from trying to script ETL by leveraging existing tools (mysql, ssh, etc.).

# ==================================================================================
# mysqlimports eample
# ==================================================================================

etlSets:
  default:
    - extract
    - load

# ==================================================================================
# Create test data
# ==================================================================================
extract:
  files:
    "/tmp/station_prcp_snow.csv":
      content: |
        [SomethngToIgnore]
        "station_id","prcp","snow"
        "US1",123,456
        "US2",234,345
        "US3",345,567

# ==================================================================================
# Load data into MySQL DB
# ==================================================================================
load:
  mysqlimports:
    "/tmp/test.csv":
      db_name: testdb
      columns: "station_id,prcp,snow"
      fields_terminated_by: ","
      lines_terminated_by: "\\n"
      fields_enclosed_by: '"'
      ignore_lines: 2
      delete: true

Here’s another concrete example Processing and graphing out precipitation and snowfall for specific weather stations..

You can find more details at etl-js and etl-js-cli.

ProjectIcon ProjectIcon ProjectIcon MKay Diary

Simple NodeJS package providing command line interface to easily create and edit diary entries for development and more.

mkay-diary entry # to create or edit today's entry
mkay-diary full # to create full diary
mkay-diary embed # to embed full diray in Readme.md

The goal of this tool is to help generate and integrate a simple dev diary. Working on lots of small projects, I found it useful to keep a diary, with simple daily entries. For example, going back to those entries after long periods of coding idleness helps remember where things were left off. Other times, without being away too long, it helps reading through a train a thought written down.

You can find more details at mkay-diary.

ProjectIcon AWS MFA

Simple bash script to help use MFA with AWS CLI. It leverages aws cli to store your new session information in your aws cli configuration. You can then reference your new profile in further aws cli commands.

aws-mfa someprofile 123456 # OTP from your device
aws --profile someprofile-mfa s3 cp ... # use your -mfa new temporary credentials now

You can find more details at aws-mfa.

ProjectIcon King

Named after the Kong Inc. company, this is a little research project into rate-limiting, which Kong provides here.

X-RateLimit-Limit-minute: 10
X-RateLimit-Remaining-minute: 0
X-RateLimit-Remaining-minute-Reset: 51624
X-RateLimit-Limit-day: 100
X-RateLimit-Remaining-day: 77

The goal was to implement simple rate limiting using some technology (redis) in Javascript and figure out its cost model.

You can find more details at king.

ProjectIcon Cue Me In (in progress)

This project is to simplify user notifications. An app is provided and users (developers) can leverage CueMeIn to detect changes and trigger notifications. The goal of this project was to first look into authentication/oauth integration with CLI programs (creating local server for callback), serverless functions (Google Functions or AWS Lambda), and managed user base (e.g. Firebase).

You can find more details at cue-me-in-cli.

ProjectIcon HPCCSystems ECL Bundle

This project regroups some functionality I often use when working with data using HPCC Systems platform.

IMPORT LPezet.Linux.Curl;

Curl.download( 'ftp://ftp.fu-berlin.de/pub/misc/movies/database/actresses.list.gz', '/tmp/actresses.list.gz' );

oFiles := DATASET([ {'ftp://ftp.fu-berlin.de/pub/misc/movies/database/actors.list.gz', '/tmp/actors.list.gz', false}, {'ftp://ftp.fu-berlin.de/pub/misc/movies/database/actresses.list.gz', '/tmp/actresses.list.gz', false}, {'ftp://ftp.fu-berlin.de/pub/misc/movies/database/directors.list.gz', '/tmp/directors.list.gz', false}], Curl.batch_layout );
Curl.batch_download( oFiles );

You can find more details at ecl-bundle-lpezet.

ProjectIcon Java Patterns, BufferedIterator, …

A collection of classes and logic, like circuit breaker, I ended up reusing a lot at work and on other personal projects.

public class SingleTryCircuitBreakerStrategyTest {

	@Test(expected=CircuitBreakerOpenException.class)
	public void stillOpen() throws Exception {
		SingleTryCircuitBreakerStrategy oStg = new SingleTryCircuitBreakerStrategy();
		oStg.setOpenToHalfOpenWaitTimeInMillis(500);
		ICircuitBreaker oBreaker = Mockito.mock(ICircuitBreaker.class);
		when(oBreaker.getLastStateChangedDateUTC()).thenReturn(DateTime.now());
		oStg.handleOpen(oBreaker, null);
	}
	
	@Test
	public void openToHalfOpenToClosed() throws Exception {
		SingleTryCircuitBreakerStrategy oStg = new SingleTryCircuitBreakerStrategy();
		oStg.setOpenToHalfOpenWaitTimeInMillis(500);
		ICircuitBreaker oBreaker = Mockito.mock(ICircuitBreaker.class);
		when(oBreaker.getLastStateChangedDateUTC()).thenReturn(DateTime.now().minusDays(1));
		Callable oCallable = Mockito.mock(Callable.class);
		when(oCallable.call()).thenReturn("HELLO");
		oStg.handleOpen(oBreaker, oCallable);
		verify(oBreaker, times(1)).halfOpen();
		verify(oBreaker, times(1)).reset();
	}
	
	@Test(expected=IOException.class)
	public void openToHalfOpen() throws Exception {
		SingleTryCircuitBreakerStrategy oStg = new SingleTryCircuitBreakerStrategy();
		oStg.setOpenToHalfOpenWaitTimeInMillis(500);
		ICircuitBreaker oBreaker = Mockito.mock(ICircuitBreaker.class);
		when(oBreaker.getLastStateChangedDateUTC()).thenReturn(DateTime.now().minusDays(1));
		Callable oCallable = Mockito.mock(Callable.class);
		when(oCallable.call()).thenThrow(new IOException());
		try {
			oStg.handleOpen(oBreaker, oCallable);
		} finally {
			verify(oBreaker, times(1)).halfOpen();
			verify(oBreaker, never()).reset();
			verify(oBreaker, times(1)).trip(any(Exception.class));
		}
	}
}

You can find more details at java.

ProjectIcon More

I worked on lots of projects, from SAS port to ECL, to Unreal Engine 4 shoot-them-up. I always strive to complete my projects, but there is only 24 hours in a day.

You can find more at lpezet.