Skip to content

Instantly share code, notes, and snippets.

@DecentM
DecentM / keybase.md
Created September 20, 2016 18:17
Keybase proof

Keybase proof

I hereby claim:

  • I am decentm on github.
  • I am decentm (https://keybase.io/decentm) on keybase.
  • I have a public key ASA5d5PTvVJaZg4q3SGnnjq7KDvhNq08JP_KTLD_Q0DBRQo

To claim this, I am signing this object:

@DecentM
DecentM / nginx.conf
Created August 25, 2016 20:47 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@DecentM
DecentM / alternatingrows.css
Last active July 31, 2016 17:30
Three alternating Bootstrap row pairs in emmet
((div.row.block-content>div.col-xs-12.col-md-6.col-lg-8.text-content>p{This is row $ on the left}^div.col-xs-12.col-md-6.col-lg-4.img-content>div.imgholder)+(div.row.block-content>div.col-xs-12.col-md-6.col-lg-8.col-md-push-6.col-lg-push-4.text-content>p{This is row $ on the right}^div.col-xs-12.col-md-6.col-lg-4.col-md-pull-6.col-lg-pull-8.img-content>div.imgholder))*3
((div.row.fixedbg>div.container>div.row.block-content>div.col-xs-12.col-md-6.col-lg-8.text-content>p{This is row $ on the left}^div.col-xs-12.col-md-6.col-lg-4.img-content>div.imgholder.staticbg)+(div.row.fixedbg>div.container>div.row.block-content>div.col-xs-12.col-md-6.col-lg-8.col-md-push-6.col-lg-push-4.text-content>p{This is row $ on the right}^div.col-xs-12.col-md-6.col-lg-4.col-md-pull-6.col-lg-pull-8.img-content>div.imgholder.staticbg))*3
@DecentM
DecentM / cloudflare-ban.sh
Created January 25, 2016 12:53 — forked from bdtech/cloudflare-ban.sh
OSSEC active response to block an IP at the Cloudflare reverse proxy level who triggers errors in short time frame in nginx logs. Required: Ossec config: sample to block IPs with multiple 500 errors or 400 errors within a minute or two timeframe. /var/ossec/etc/ossec.conf <command> <name>cloudflare-ban</name> <executable>cloudflare-ban.sh</execu…
#!/bin/sh
# Adds an IP to Cloudflare IP block list
# Path: /var/ossec/active-response/bin/cloudflare-ban.sh
#
ACTION=$1
USER=$2
IP=$3
PWD=`pwd`
TKN='CF API KEY'