Skip to content

Instantly share code, notes, and snippets.

DecentM /
Created January 25, 2016 12:53 — forked from bdtech/
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></execu…
# Adds an IP to Cloudflare IP block list
# Path: /var/ossec/active-response/bin/
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 / 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
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
DecentM /
Created September 20, 2016 18:17
Keybase proof

Keybase proof

I hereby claim:

  • I am decentm on github.
  • I am decentm ( on keybase.
  • I have a public key ASA5d5PTvVJaZg4q3SGnnjq7KDvhNq08JP_KTLD_Q0DBRQo

To claim this, I am signing this object:

DecentM / material-userstyles-old.css
Last active December 18, 2016 01:28
This is the old version of my userstyle, Material Userstyles. This version is now under the Public Domain. Some amount of work is required to get it working.
@namespace url(;
/* Material Userstyles v1.0 by DecentM */
@-moz-document regexp("https?\:\/\/*") {
#advanced-search *,
#related li:not(.more),
DecentM / material-userstyles-v2.css
Last active December 18, 2016 01:51
The previuos version of my theme "Material Userstyles", now under the public domain. A bit of tweaking is required for it to be able to have custom colors.
@namespace url(;
/* Material Userstyles v2.0 by DecentM */
@-moz-document regexp("https?\:\/\/*") {
* Bootstrap v4.0.0-alpha.4 (
* Copyright 2011-2016 The Bootstrap Authors
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (
*//*! normalize.css v4.0.0 | MIT License | */ html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}progress{vertical-align:baseline}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}dfn{font-style:ita
DecentM /
Created August 23, 2017 19:23
Forward from my VPN to LAN
iptables -I FORWARD -i tun0 -o enxb827ebf29db7 -s -d -m conntrack --ctstate NEW -j ACCEPT
iptables -I FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -t nat -I POSTROUTING -o eth0 -s -j MASQUERADE
DecentM /
Created January 4, 2018 11:28

OpenUserCSS Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by OpenUserCSS or its affiliates (“OpenUserCSS”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to OpenUserCSS in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.

Copyright License. You hereby grant, and agree to grant, to OpenUserCS

DecentM / test.user.css
Created January 5, 2018 15:35
/* ==userstyle==
@name Title
@description <b>Bold</b> - Not bold
@version 0.0.1
@author Something
==/userstyle== */
DecentM /
Created February 10, 2018 22:03 — forked from tyleramos/
XVFB Run Bash script
# $Id: xvfb-run 2027 2004-11-16 14:54:16Z branden $
# This script starts an instance of Xvfb, the "fake" X server, runs a command
# with that server available, and kills the X server when done. The return
# value of the command becomes the return value of this script, except in cases
# where this script encounters an error.
# If anyone is using this to build a Debian package, make sure the package