Skip to content

Instantly share code, notes, and snippets.

View pholat's full-sized avatar
🙈

Adam Dobrowolski pholat

🙈
View GitHub Profile
# add to .vimrc: `au BufRead,BufNewFile *.log set filetype=log` and open `.log` files with colors
if exists("b:current_syntax")
finish
endif
let b:current_syntax = "log"
syntax match EVT "event:"
" [ServiceBluetooth_w1] GAP.cpp:addNewDevice:181:
@pholat
pholat / .gitconfig
Created November 17, 2021 09:08
the most time saving configurations in my .gitconfig file
[core]
autocrlf = false
[alias]
# lists user branches in last time ordered matter - useful to manage multiple branches at once
brtime = for-each-ref --sort=committerdate refs/heads/ --format='%(color: red)%(committerdate:short) %(color: cyan)%(refname:short)'
# list all branches including remotes in timed matter - usefull to verify branches older than `x`
brtime-all = for-each-ref --sort=committerdate --format='%(color: red)%(committerdate:short) %(color: white)%(authorname) %(color: cyan)%(refname:short)'
[push]
default = current
@pholat
pholat / find_latest_20.sh
Last active November 17, 2021 08:46
FInd latest 20 files changed in directory
find . -type f -ls 2>/dev/null | sort -M -k8,10 | head -n20
@pholat
pholat / tqdm_logging.py
Created November 9, 2021 15:18
make tqdm work with logging
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)
class TqdmLoggingHandler(logging.Handler):
'''
required for pretty logs with tqdm
'''
def __init__(self, level=logging.NOTSET):
super().__init__(level)
@pholat
pholat / Mudita_CLA
Last active November 6, 2020 14:14
Mudita Individual Contributor License Agreement
Mudita Individual Contributor License Agreement
By signing this contributor license agreement, I understand and agree that this project and contributions to it are public and that a record of the contribution (including all personal information I submit with it, including my full name and email address) is maintained indefinitely and may be redistributed consistent with this project, compliance with the Open Source license(s) involved, and maintenance of authorship attribution.
In order to clarify the intellectual property license granted with Contributions from any person or entity, Mudita Sp. z o. o. ("Mudita") must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Mudita; it does not change your rights to use your own Contributions for any other purpose.
You accept and agree to the following terms and conditions for Your present a
@pholat
pholat / pid.cpp
Created March 1, 2017 22:52 — forked from bradley219/.gitignore
PID C++ implementation
#ifndef _PID_SOURCE_
#define _PID_SOURCE_
#include <iostream>
#include <cmath>
#include "pid.h"
using namespace std;
class PIDImpl