Skip to content

Instantly share code, notes, and snippets.

Kamil Harasimowicz HarasimowiczKamil

Block or report user

Report or block HarasimowiczKamil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View redis_combo_commands.redis
// remove keys matching to pattern
EVAL "return redis.call('del', unpack(redis.call('keys', ARGV[1])))" 0 prefix:*
View Makefile
#COLORS
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
HELP_FUN = \
@HarasimowiczKamil
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 = {};
@HarasimowiczKamil
HarasimowiczKamil / fingerprint.sh
Created Aug 22, 2017
Github like ssh key fingerprint
View fingerprint.sh
#!/bin/bash
ssh-keygen -l -E md5 -f ~/.ssh/id_rsa.pub
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"/>
View tail_color.sh
# functions
CLREOL=$'\x1B[K'
# 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 .nanorc
set linenumbers
# find /usr/share/nano/ -iname "*.nanorc" -exec echo include {} \; >> ~/.nanorc
You can’t perform that action at this time.