Skip to content

Instantly share code, notes, and snippets.

View vladris's full-sized avatar
🤠

Vlad Riscutia vladris

🤠
View GitHub Profile
@vladris
vladris / prune.cmd
Created January 3, 2019 00:40
Prune already deleted files from git history
git log --diff-filter=D --name-only --pretty="format:" > ..\FILES
for /f "tokens=*" %%a in (..\FILES) do (
git filter-branch --tag-name-filter cat --index-filter "git rm -r --cached --ignore-unmatch %%a" --prune-empty -f -- --all
)
@vladris
vladris / keyring.csv
Created May 28, 2021 17:01
Keyring content
GroupId KeyType KeyValue
f03c9e90-5d97-4a11-82aa-480f74325a2c CookieId 657d31b9-0614-4df7-8be6-d576738a9661
62159798-2447-41e3-b0ef-f1a239d55978 CookieId 0864c60d-cc36-4384-81a3-e4c1eee14fe7
f03c9e90-5d97-4a11-82aa-480f74325a2c ProfileId 10002
62159798-2447-41e3-b0ef-f1a239d55978 ProfileId 10003
f03c9e90-5d97-4a11-82aa-480f74325a2c Email emma@hotmail.com
62159798-2447-41e3-b0ef-f1a239d55978 Email oliver@hotmail.com
f03c9e90-5d97-4a11-82aa-480f74325a2c SupportCustomerId 21
62159798-2447-41e3-b0ef-f1a239d55978 SupportCustomerId 22
f03c9e90-5d97-4a11-82aa-480f74325a2c CustomerId 1001
@vladris
vladris / timeline.csv
Last active September 5, 2021 23:12
Timeline table
Timestamp KeyType KeyValue EventType EventProperties
2020-06-01T00:00:00Z CustomerId 1001 Subscription-Create {"SubscriptionId": "fd10b613-8378-4d37-b8e7-bb665999d122"}
2020-07-01T00:00:00Z Support-CustomerId 21 SupportTicket-Opened {"Message": "..."}
2020-07-03T00:00:00Z Support-CustomerId 21 SupportTicket-Opened {"Message": "..."}
2020-07-05T00:00:00Z Support-CustomerId 21 SupportTicket-Closed {"Message": "..."}
2020-07-19T00:00:00Z Support-CustomerId 21 SupportTicket-Closed {"Message": "..."}
2020-07-19T00:00:00Z CustomerId 1001 Subscription-Close {"SubscriptionId": "fd10b613-8378-4d37-b8e7-bb665999d122"}
@vladris
vladris / timsort.py
Created December 30, 2021 19:04
Python Timsort implementation based on the OpenJDK Java implementation
MIN_MERGE = 32
MIN_GALLOP = 7
minGallop = MIN_GALLOP
def minRunLength(n):
r = 0
while n >= MIN_MERGE:
r |= n & 1
n >>= 1
@vladris
vladris / gol.ts
Last active June 11, 2022 17:17
Game of Life visualization
// Game of Life cell matrix wrapped in an object
type Matrix = {
m: boolean[][]
wrap: boolean;
};
// Makes matrix of desired width x height plus an initial configuration of "on" cells and wrap-around flag
function makeMatrix(width: number, height: number, initialConfig: [number, number][], wrap: boolean) {
let m = new Array<boolean[]>(height);