Skip to content

Instantly share code, notes, and snippets.


Kamil Harasimowicz HarasimowiczKamil

View GitHub Profile
# count commits per file (per author add `--author=John`)
git log --name-only --pretty=format: | sort | uniq -c | sort -nr
# "Cyclomatic Complexity"
grep -oic "[\s]*" filename
View Fix for gedit with xim mode
# /usr/share/themes/Ambiance/gtk-3.20/gtk.css
textview text {
background-color: white;
scrollbar {
background-color: white;
@import url("gtk-main.css");
View .nanorc
set linenumbers
# find /usr/share/nano/ -iname "*.nanorc" -exec echo include {} \; >> ~/.nanorc
# functions
# ex. tail-color "/path/to/logs.log" "PHRASE TO EXTRA COLOR"
tail-color () {
COLORS="-e 's/\(.*DEBUG.*\)/\o033[32m\1\o033[39m/'"
COLORS="$COLORS -e 's/\(.*NOTICE.*\) /\o033[97m\1\o033[39m/'"
COLORS="$COLORS -e 's/\(.*WARNING.*\) /\o033[93m\1\o033[39m/'"
COLORS="$COLORS -e 's/\(.*ERROR.*\)/\o033[91m\1\o033[39m/'"
View ruleset_psr.xml
<?xml version="1.0"?>
<ruleset name="PSR extended">
<description>PSR extended with PEAR comments</description>
<rule ref="PEAR.Commenting.FileComment">
<exclude name="PEAR.Commenting.FileComment.MissingAuthorTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingCategoryTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingLicenseTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingLinkTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingPackageTag"/>
HarasimowiczKamil /
Created Aug 22, 2017
Github like ssh key fingerprint
ssh-keygen -l -E md5 -f ~/.ssh/
HarasimowiczKamil / merge.js
Created Mar 18, 2016
Merge objects in javascript
View merge.js
* Merge objects
* @param {...object} obj
* @return {object}
function merge() {
var i, obj, key,
result = {};
View Makefile
GREEN := $(shell tput -Txterm setaf 2)
WHITE := $(shell tput -Txterm setaf 7)
YELLOW := $(shell tput -Txterm setaf 3)
RESET := $(shell tput -Txterm sgr0)
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
# A category can be added with @category
View redis_combo_commands.redis
// remove keys matching to pattern
EVAL "return'del', unpack('keys', ARGV[1])))" 0 prefix:*
You can’t perform that action at this time.