I hereby claim:
- I am ssimono on github.
- I am ssimono (https://keybase.io/ssimono) on keybase.
- I have a public key whose fingerprint is F09F 5E37 2186 27B5 904E EBB7 154E 4E82 E84C 8DD0
To claim this, I am signing this object:
| #!/usr/bin/env python3 | |
| """ | |
| Simulate the non-existing git post-fetch hook by wrapping the call of ssh. | |
| Usage: | |
| git config core.sshCommand post-fetch-git-ssh-command.py | |
| git <fetch|pull> [remote] | |
| After fetching, it will call the repository's post-fetch hook, if available and executable. |
| #!/usr/bin/env bash | |
| # Dirage starts a shell in a memory-mounted folder. | |
| # When the shell session ends, the content is compressed and encrypted using an age key. | |
| # Opening the resulting file with dirage will start a similar shell with the decrypted content available. | |
| # | |
| # EXAMPLES | |
| # | |
| # - Creating an age key: age-keygen > priv.txt | |
| # - Opening a dirage file with this key: DIRAGE_PRIVATE_KEY_FILE=priv.txt dirage file.tar.gz.age |
| from argparse import ArgumentParser, RawDescriptionHelpFormatter | |
| from json import load, dump | |
| from re import search | |
| from subprocess import run, PIPE | |
| from sys import exit | |
| from textwrap import dedent | |
| import hashlib | |
| def _git_update_index(skip_worktree, file_path): |
| /** | |
| * Usage: Copy this entire snippet and paste it into the developer console. | |
| * A link will appear on the top just above the event title (on Desktop view). | |
| * Just click it to get a CSV containing the expenses. | |
| * | |
| * Please double-check the result as this is made via frontend scrapping and | |
| * can therefore miss edge cases or break upon future changes in the document | |
| * structure. | |
| */ |
| """ | |
| Problem: | |
| An icecream vendor starts her shift with an empty box of change. She sells icecreams for 5€ per unit. | |
| Customers show up one by one and pay with bills of either 5€, 10€, 20€ or 50€. | |
| Depending on the order of customers and the bills they give, she might or might not become unable to process a transaction at some point. | |
| Task: write a function icecream that takes an array of integers representing the suite of bills that each customer gives. | |
| The function must return a boolean that indicates whether the seller can fullfil all customers purchases. | |
| """ | |
| import unittest |
| from collections import deque | |
| from enum import Enum | |
| from functools import lru_cache | |
| from random import randint | |
| from sys import stderr | |
| from time import sleep | |
| from typing import Generator, Iterable, NamedTuple | |
| MAP_WIDTH = 30 | |
| MAP_HEIGHT = 30 |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| # This pre hook runs all go checking tools on every relevant go file. | |
| # Returns status 1 if checks fail, preventing commit to be done | |
| function fmtdiff { | |
| gofmt -d $@ > /tmp/gofmtdiff | |
| if [ `wc -l < /tmp/gofmtdiff` != 0 ]; then | |
| cat /tmp/gofmtdiff | |
| echo "Run gofmt to apply those changes" |