Skip to content

Instantly share code, notes, and snippets.

View gorbak25's full-sized avatar
🦝
Doing random stuff

Grzegorz Uriasz gorbak25

🦝
Doing random stuff
  • Hocus
  • Warsaw, Poland
View GitHub Profile
defmodule Util do
def merge_and_dedup(a, b) do
internal_merge_and_dedup(Enum.reverse(a), Enum.reverse(b), [])
end
defp internal_merge_and_dedup([h1 | t1] = l1, [h2 | t2] = l2, []) do
if h1 < h2 do
internal_merge_and_dedup(l1, t2, [h2])
else
internal_merge_and_dedup(t1, l2, [h1])
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 6.
,seed,actions
0,3950940000,"[1, 2, 3, 3, 1, 2, 0, 2, 2, 1, 0, 3, 3, 1, 2, 3, 0, 2, 2, 2, 1, 3, 0, 1, 2, 0, 0, 2, 1, 3, 2, 0, 3, 3, 1, 3, 3, 1, 2]"
1,3950940001,"[1, 0, 2, 0, 3, 1, 1, 3, 2, 0, 0, 3, 0, 2, 1, 1, 1, 3, 3, 0, 0]"
2,3950940002,"[3, 2, 0, 0, 0, 2, 1, 2, 0, 0, 2, 0, 3, 3, 1, 2, 2, 0, 3, 3, 3, 3, 3, 1, 2, 1, 2, 1, 3, 1, 1, 2, 2, 0, 3, 2, 1, 3, 3, 0, 0, 0, 0, 3, 0, 2, 2, 2, 2, 2, 1, 3, 1, 3, 0, 1, 2, 0, 2, 0, 3, 3, 3, 3, 3, 1, 2, 1, 1, 2, 1, 2, 0, 2, 0, 0, 3, 1, 0, 1, 2, 0, 2, 0, 3, 3, 3, 3, 3, 1, 2, 1, 2, 1, 2, 3, 0, 3, 0, 3, 0, 2, 2, 2, 1, 1, 3, 2, 0, 2, 2, 0, 3, 3, 3, 3, 3, 1, 2, 1, 1, 2, 1, 2, 0, 3, 0, 3, 0, 3, 0, 2, 2, 2, 2, 2, 1, 3, 1, 3]"
3,3950940003,"[2, 1, 0, 3, 1, 1, 2, 3, 1, 2, 0, 2]"
4,3950940004,"[2, 3, 0, 3, 1, 2, 2, 1, 1, 1, 1, 3, 3, 3, 3, 0, 2, 2, 0, 3, 0, 0, 2, 0, 3, 3, 1, 0, 3, 1, 2, 2, 1, 1, 2, 0, 3, 2, 1, 3, 3, 0, 2, 0, 2, 1, 3, 0, 2, 0, 3, 3, 1, 0, 3, 1, 2, 2, 2, 2, 3, 1, 3, 0, 3, 0, 3, 1, 1, 1, 2, 0, 2, 2, 0, 2, 0, 2, 1, 3, 2, 0, 3, 3, 3, 3, 1, 0, 3, 1, 2, 2, 1, 2, 0, 2, 2, 1, 0
{
"message" : [
"55534243123456788000000080000606f50402527000000000000000000000",
],
"devices" : {
"1bbb:0195": {
"*": {
"t_vender": 7099,
"t_product": [ 23 ],
"msg": [ 0 ]
@gorbak25
gorbak25 / agent.ps1
Last active February 26, 2024 02:33
Enable ssh-agent on Windows
# By default the ssh-agent service is disabled. Configure it to start automatically.
# Make sure you're running as an Administrator.
Get-Service ssh-agent | Set-Service -StartupType Automatic
# Start the service
Start-Service ssh-agent
# This should return a status of Running
Get-Service ssh-agent
@gorbak25
gorbak25 / zad1.proto
Created May 1, 2023 14:45
WWW19 Distributed Systems Workshops
syntax = "proto3";
package zad1;
enum MathOperation {
ADD = 0;
SUB = 1;
MUL = 2;
}
message AstBranch {

Keybase proof

I hereby claim:

  • I am gorbak25 on github.
  • I am gorbak25 (https://keybase.io/gorbak25) on keybase.
  • I have a public key ASADJz7h_lHVx09H3wC8QEXKWh4nwp8OK7Incm3_wQaT4Ao

To claim this, I am signing this object:

@gorbak25
gorbak25 / cla.md
Last active July 25, 2023 14:37
Hocus Individual Contributor License Agreement

Hocus Individual Contributor License Agreement

Thank you for your interest in contributing to software projects managed by Hocus Dev, Inc. a Delaware C Corporation (“We” or “Us”).

This contributor agreement (“Agreement”) documents the rights granted by contributors to Us. To make this document effective, please sign it and send it to Us by email or electronic submission, following the instructions at https://github.com/hocus-dev/hocus/blob/main/CONTRIBUTING.md . This is a legally binding document, so please read it carefully before agreeing to it. The Agreement may cover more than one software project managed by Us.

1. Definitions

“You” means the individual who Submits a Contribution to Us.

“Contribution” means any work of authorship that is Submitted by You to Us in which You own or assert ownership of the Copyright. If You do not own the Copyright in the entire work of authorship, please follow the instructions in https://github.com/hocus-dev/hocus/blob/main/CONTRIBUTING.md .