This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// remove keys matching to pattern | |
EVAL "return redis.call('del', unpack(redis.call('keys', ARGV[1])))" 0 prefix:* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 = \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Merge objects | |
* | |
* @param {...object} obj | |
* | |
* @return {object} | |
*/ | |
function merge() { | |
var i, obj, key, | |
result = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ssh-keygen -l -E md5 -f ~/.ssh/id_rsa.pub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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/'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set linenumbers | |
# find /usr/share/nano/ -iname "*.nanorc" -exec echo include {} \; >> ~/.nanorc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /usr/share/themes/Ambiance/gtk-3.20/gtk.css | |
textview text { | |
background-color: white; | |
} | |
scrollbar { | |
background-color: white; | |
} | |
@import url("gtk-main.css"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
# Changelog | |
git tag -l -n9 --sort=-v:refname |