Skip to content

Instantly share code, notes, and snippets.

@keinwort
keinwort / .zshrc
Last active July 21, 2021 00:33 — forked from ahmadawais/.zshrc
Print status for all fail2ban jails.
# Print status for all fail2ban jails. a little bit more space between
f2stall() { JAILS=($(fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'))
for JAIL in ${JAILS[@]}
do
echo " "
echo "--------------- 👀 JAIL STATUS: $JAIL ... ---------------"
fail2ban-client status $JAIL
echo "### --------- ### ... ### --------- ### ... ### --------- ###"
echo " "
done
@keinwort
keinwort / shrink-pdf.sh
Created February 4, 2018 14:12 — forked from wikrie/shrink-pdf.sh
shrink size of a pdf file terminal edition
#!/bin/bash
read -e -p "Please insert file: " file
if test -e $file
then pdf2ps $file tmp.ps && ps2pdf tmp.ps $file-small.pdf && rm tmp.ps
else echo "File not found!"
fi
@keinwort
keinwort / tutorial_kali_autologin_afterupdate.txt
Created December 12, 2017 00:08 — forked from intrd/tutorial_kali_autologin_afterupdate.txt
Kali light xfce4 root autologin (works after lightdm update)
## Kali light xfce4 root autologin (works after lightdm update)
# @author intrd - http://dann.com.br/
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
After lighdtdm update root autologin is broken fix doing this:
nano /etc/lightdm/lightdm.conf
at [Seat:*] group uncomment/edit:
autologin-user=root
autologin-user-timeout=0
@keinwort
keinwort / Razer Synapse Yosemite.md
Last active September 18, 2017 14:46 — forked from tdegrunt/Razer Synapse Yosemite.md
How to fix Razer Synapse in Mac OSX 10.0 Yosemite

How to fix Razer Synapse in Mac OSX 10.0 Yosemite

Start Terminal.app and type:

sudo nvram boot-args="kext-dev-mode=1"

Verify that command works by typing:

sudo nvram -p | grep -i boot-args
# SYNTAX:
var pattern = new RegExp(pattern, attributes); # attributes: g (global); i (case-sensitive); m (multiline matches)
var pattern = /pattern/attributes; # same as above
# BRACKETS:
[...]: Any one character between the brackets.
[^...]: Any one character not between the brackets.
@keinwort
keinwort / bash-cheatsheet.sh
Created September 14, 2017 20:17 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@keinwort
keinwort / nginx.conf
Last active September 18, 2017 14:44 — forked from weapp/nginx.conf
Return common errors as json in Nginx #nginx #error
### possible include this
# include /put_path_here/nginx_errors.conf
error_page 500 /500.html;
location /500.html{
return 500 '{"error": {"status_code": 500,"status": "Internal Server Error"}}';
}
error_page 502 /502.html;
location /502.html{