Skip to content

Instantly share code, notes, and snippets.

View barbu110's full-sized avatar
🍷
Hacking...

Victor Barbu barbu110

🍷
Hacking...
View GitHub Profile
@barbu110
barbu110 / log-parser.lark
Created April 18, 2024 09:47
Lark grammar to parse logs of objects in Java application
list: ("[" list_item (LIST_SEPARATOR list_item)* "]" WS?) | ("[" WS? "]" WS?)
list_item: WS? object_instance WS?
object_instance: IDENT WS? object_params
object_params: empty_object_params | non_empty_object_params
empty_object_params: "(" WS? ")"
non_empty_object_params: "(" assignment_list_non_empty ")"
assignment_list_non_empty: object_param (LIST_SEPARATOR object_param)*
object_param: WS? object_param_name WS? "=" WS? object_param_value WS?
object_param_name: IDENT
object_param_value: WS? (value_null | value_bool | value_int | value_str | value_dict | value_optional | value_list) WS?
@barbu110
barbu110 / led_blink_timer_interrupt.rs
Created February 25, 2024 17:51
Code to make an LED (on PA5) blink on a STM32L476RGTx using timer interrupts.
@barbu110
barbu110 / ddb.yml
Created June 2, 2022 08:18
Provision a DynamoDB local service in Kubernetes
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ddb-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
%include "io.inc"
%define ARRAY_SIZE 13
%define DECIMAL_PLACES 5
section .data
num_array dw 76, 12, 65, 19, 781, 671, 431, 761, 782, 12, 91, 25, 9
array_sum_prefix db "Sum of numbers: ",0
array_mean_prefix db "Numbers mean: ",0
decimal_point db ".",0
@barbu110
barbu110 / data.h
Created March 17, 2019 07:45
MoveSemanticsExercise created by victorbarbu - https://repl.it/@victorbarbu/MoveSemanticsExercise
#pragma once
#include <iostream>
#include <cstring>
#include <string>
#ifndef debug
#define debug false
#endif