View iptables_user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# chkconfig: - 50 50 | |
# description: Initializes custom firewall | |
usage () | |
{ | |
echo $"Usage: $0 {start|stop|status|restart|condrestart}" 1>&2 | |
} | |
start () |
View rules.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://wiki.archlinux.org/index.php/simple_stateful_firewall | |
iptables -F | |
iptables -X | |
iptables -N TCP | |
iptables -N UDP | |
iptables -P INPUT DROP |
View .screenrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autodetach on | |
startup_message off | |
hardstatus alwayslastline | |
shelltitle 'bash' | |
hardstatus string '%{gk}[%{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= w}%?%+Lw%?%? %{g}][%{d}%l%{g}][ %{= w}%Y/%m/%d %0C:%s%a%{g} ]%{W}' | |
bindkey -k k6 prev | |
bindkey -k k7 next |
View backup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Website Backup Script | |
# http://webgnuru.com/linux/rsync_incremental.php | |
# Adapted to be run by anacron | |
# before running the script for the first time | |
# full_incremental should contain a dir like 2017-01-01 | |
# empty or having a full backup |
View convert icons and splash image for ionic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -iname "*.png" -exec file {} \; | awk '{print "convert source.png -resize",$5"x"$7,"out/"$1}' | sed 's/\(,\|:\|\.\/\)//g' > convert.sh |
View gist:70a9572ec39eab5c8b1a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tail -f app/storage/logs/laravel.log | grep --line-buffered -v -P '(^#\d+|^Stack)' |
View global.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App::error(function(Exception $exception, $code) | |
{ | |
if ($exception instanceof Symfony\Component\HttpKernel\Exception\NotFoundHttpException) { | |
Log::error([ | |
'route' => Request::fullUrl(), | |
'user_id' => Auth::check() ? Auth::id() : "Anonymous", | |
'code' => $code, | |
'ip' => Request::ip(), | |
'headers' => Request::header('user-agent') | |
]); |
View tmux.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Prefix is Ctrl-a | |
set -g prefix C-a | |
bind C-a send-prefix | |
unbind C-b | |
#Mouse works as expected | |
setw -g mode-mouse on | |
set -g mouse-select-pane on | |
set -g mouse-resize-pane on | |
set -g mouse-select-window on |
View ioc.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Lightweight IOC container | |
*/ | |
class IOC { | |
// if a hinted class name is matched here | |
// use the associated value as the new class |