Skip to content

Instantly share code, notes, and snippets.

kein wort keinwort

Block or report user

Report or block keinwort

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@keinwort
keinwort / kali_linux_natural_scrolling.txt
Last active Mar 25, 2018
kali rolling 2018 with lightdm/mate enable "natural scrolling" aka "reverse scrolling"
View kali_linux_natural_scrolling.txt
@license WTFPL – Do What the Fuck You Want to Public License - http://www.wtfpl.net
@author keinwort - https://github.com/keinwort
# on newer Kali releases the Xmodmap option won't work anymore for every window #
# "xmodmap ~/.Xmodmap" (for reloading)
<.Xmodmap
# pointer = 1 2 3 5 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/.Xmodmap>
# so we must use other methods
@keinwort
keinwort / shrink-pdf.sh
Created Feb 4, 2018 — forked from wikrie/shrink-pdf.sh
shrink size of a pdf file terminal edition
View shrink-pdf.sh
#!/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 Dec 12, 2017 — forked from intrd/tutorial_kali_autologin_afterupdate.txt
Kali light xfce4 root autologin (works after lightdm update)
View tutorial_kali_autologin_afterupdate.txt
## 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 / .bashrc
Last active Mar 28, 2018
dotfile debian .bashrc #debian #linux #bash #dotfile #xterm
View .bashrc
# @linux debian
# ~/.bashrc: executed by bash(1) for non-login shells.
# "source ./.bashrc" or ". ~/.bashrc" (for reloading the shell)
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@keinwort
keinwort / .bash_profile
Last active Sep 18, 2017
dotfile Mac OS X .bash_profile #mac #bash #dotfile #xterm
View .bash_profile
# @mac
# ~/.bashrc: executed by bash(1) for non-login shells.
# source ./.bashrc (for reloading)
export PATH=/usr/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/php5/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/X11/bin
test -e ${HOME}/.iterm2_shell_integration.bash && source ${HOME}/.iterm2_shell_integration.bash
# export PS1='\u@\h: \w\$ '
export PS1='\[\033[0;34m\][\t]>\[\033[01;31m\]\u@\h\[\033[00m\]: \[\033[01;34m\]\w\[\033[00m\]\n└╼ \$ '
@keinwort
keinwort / undupe_bash_history.sh
Last active Sep 18, 2017
remove duplicate lines of current bash_history #bash #sh #macOS #linux #bash_history
View undupe_bash_history.sh
#!/usr/bin/env bash
## https://superuser.com/questions/722461/how-can-you-remove-duplicates-from-bash-history
## It is possible to remove duplicated lines which are already in .bash_history by running
echo bash_history - remove duplicated lines
echo --------------------------------------
echo first back it up
date_now=$(date +"%Y-%m-%d-%H%M%S")
cp ~/.bash_history ~/bash_history.old_$date_now
echo removing duplicate lines
nl ~/.bash_history | sort -k 2 -k 1,1nr| uniq -f 1 | sort -n | cut -f 2 > ~/unduped_history
@keinwort
keinwort / Razer Synapse Yosemite.md
Last active Sep 18, 2017 — forked from tdegrunt/Razer Synapse Yosemite.md
How to fix Razer Synapse in Mac OSX 10.0 Yosemite
View Razer Synapse Yosemite.md

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
View regular-expressions.cheatsheet.coffee
# 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 Sep 14, 2017 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
View bash-cheatsheet.sh
#!/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 Sep 18, 2017 — forked from weapp/nginx.conf
Return common errors as json in Nginx #nginx #error
View nginx.conf
### 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{
You can’t perform that action at this time.