This file contains hidden or 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
| if ((Get-Command "scoop" -ErrorAction SilentlyContinue) -eq $null) | |
| { | |
| #Set-ExecutionPolicy RemoteSigned -Scope CurrentUser | |
| irm get.scoop.sh | iex | |
| scoop install git | |
| scoop bucket add extras | |
| } | |
| scoop install thunderbird 7zip microsip foxit-pdf-reader googlechrome anydesk teamviewer zoom skype |
This file contains hidden or 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 () |
This file contains hidden or 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 |
This file contains hidden or 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 |
This file contains hidden or 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 |
This file contains hidden or 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 |
This file contains hidden or 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)' |
This file contains hidden or 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') | |
| ]); |
This file contains hidden or 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 |
This file contains hidden or 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 |