Skip to content

Instantly share code, notes, and snippets.

View EternallLight's full-sized avatar

Andrey Grunev EternallLight

View GitHub Profile

Keybase proof

I hereby claim:

  • I am eternalllight on github.
  • I am agrunev (https://keybase.io/agrunev) on keybase.
  • I have a public key ASBi8mVUaqjkA58LiAer5k_OkTHZeZmZUBlM7VMUqnUCbwo

To claim this, I am signing this object:

@EternallLight
EternallLight / voipbl.sh
Created March 18, 2018 08:04
Fail2Ban on Steroids – VoIP BlackList
#!/bin/bash
# Check if chain exists and create one if required
if [ `iptables -L | grep -c "Chain BLACKLIST-INPUT"` -lt 1 ]; then
/sbin/iptables -N BLACKLIST-INPUT
/sbin/iptables -I INPUT 1 -j BLACKLIST-INPUT
fi
# Empty the chain
/sbin/iptables -F BLACKLIST-INPUT
wget -qO - “http://www.voipbl.org/update/” |\
awk '{print "if [ ! -z \""$1"\" -a \""$1"\" != \"#\" ]; then /sbin/iptables -A
@EternallLight
EternallLight / textareaResizer.js
Last active September 10, 2016 13:52
Angular 1 directive which dynamically regulates TEXTAREA's height to fit the content that's being typed in
// Read more at http://web-mystery.com/articles/creating-dynamically-resizing-textarea-and-wrapping-it-angular-1-directive
angular.module('myAwesomeTextarea', [])
.directive('textareaResizer', function() {
return {
restrict: 'A',
link: function(scope, element) {
// Check if the directive is used on a textarea and stop otherwise
if (element[0].tagName != 'TEXTAREA') {
return;