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
| #!/usr/bin/env bash | |
| ##This is very crude.. but its enough for me [meh] | |
| # contents of this text file is a youtube URL per line.. EG: | |
| #-- | |
| #cat listofvideos.txt | |
| #https://www.youtube.com/watch?v=RrLAaDCPc3I | |
| #-- | |
| fileVideoList=listofvideos.txt |
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
| cat > /tmp/iptables.generic <<EOF | |
| *filter | |
| :INPUT DROP [0:0] | |
| :FORWARD ACCEPT [0:0] | |
| :OUTPUT ACCEPT [0:0] | |
| :LOGGING - [0:0] | |
| -A INPUT -i lo -j ACCEPT | |
| -A INPUT -d 127.0.0.0/8 ! -i lo -j REJECT --reject-with icmp-port-unreachable | |
| -A INPUT -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j 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
| #!/usr/bin/env python | |
| from optparse import OptionParser | |
| import redis | |
| def main(): | |
| parser = OptionParser() | |
| parser.add_option("-d", "--database", default=0, help="target redis database, default is 0", dest="database") | |
| parser.add_option("-a", "--address", default="127.0.0.1", help="target redis host, default is 127.0.0.1") | |
| parser.add_option("-p", "--port", default=6379, help="target redis host, default is 127.0.0.1") |
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
| #!/usr/bin/env bash | |
| # v for vagrant david@starkers.org | |
| #get a list of vagrant VMs.. | |
| #...I know its ugly | |
| loremipsums="$(vagrant global-status | grep -A999 "^----" | grep -v "^----" | grep -B99 "The above shows information about all known Vagrant environments" | grep -v "^ $" | grep -v "The above shows information about all known Vagrant environments" | awk '{print $5,$4}')" | |
| oldIFS=$IFS |
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
| #!/usr/bin/env bash | |
| if [ -e $(dirname "$0")/nsenter ]; then | |
| # with boot2docker, nsenter is not in the PATH but it is in the same folder | |
| NSENTER=$(dirname "$0")/nsenter | |
| else | |
| NSENTER=nsenter | |
| fi | |
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
| " "========================================================================" | |
| " "========== vim-plug for plugin management" | |
| " "========================================================================" | |
| call plug#begin('~/.local/share/nvim/plugged') | |
| " "========================================================================" | |
| " "========== completions and linting" | |
| function! BuildYCM(info) | |
| " function to automatically run install.py for you |
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
| # Normal shortcuts | |
| <ctrl-/> comment/uncomment a line or visual block | |
| <ctrl-f> open "files" in the same dir as current file | |
| <ctrl-p> "CtrlP" file browser (fuzzy finding) | |
| <ctrl-n> "new" buffer | |
| <ctrl-o> "open" previous files from MRU (most recently used) | |
| <leader>? view vim cheatsheet / "help" | |
| <leader>e show/disable "expand tab" toggle | |
| <leader>f toggle the "file browser" pane, ? for help or :help NERDtree | |
| <leader>g toggle "git" hints |
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
| " "========================================================================" | |
| " "========== vim-plug for plugin management" | |
| " "========================================================================" | |
| call plug#begin('~/.local/share/nvim/plugged') | |
| " "========================================================================" | |
| " "========== completions and linting" | |
| function! BuildYCM(info) | |
| " function to automatically run install.py for you |
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
| # i3 config | |
| #AKA Super/Windows/Apple | |
| set $mod Mod4 | |
| set $terminal terminator | |
| #How to alise colors EG: | |
| # set_from_resource $darkred color1 #000000 | |
| # set_from_resource $red color9 #000000 |
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
| " "========================================================================" | |
| " "========== vim-plug for plugin management" | |
| " "========================================================================" | |
| call plug#begin('~/.local/share/nvim/plugged') | |
| " "========================================================================" | |
| " "========== completions and linting" | |
| function! BuildYCM(info) | |
| " function to automatically run install.py for you |