I hereby claim:
- I am lmlsna on github.
- I am mlsna (https://keybase.io/mlsna) on keybase.
- I have a public key ASAUo_z8mC69AnoQfAqJ1vnKKTSs4kfZjqoWi6iYP2KofQo
To claim this, I am signing this object:
| #!/bin/bash | |
| # Shell script to bootstrap Bootstrap... | |
| # JS Extra files w/ integrity hashes | |
| JQ_URL="https://code.jquery.com/jquery-3.2.1.slim.min.js" | |
| JQ_SHA384="KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" | |
| POP_URL="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" | |
| POP_SHA384="ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" |
| #!/bin/bash | |
| # This is a simple bash function to change strings (of arbitrary length) into integers (of arbitrary maximums). | |
| # I use this to convert my "user@hostname" to a number between 1-255 and use that as a persistent color for the | |
| # termnal prompt to remind me what box/user I am on. | |
| # | |
| # It just hashes whatever string you give it, converts the hex to a decimal and then mods around whatever your max int is. | |
| # Usage: str_to_int [string_to_convert] [max_int_size] | |
| # Example: str_to_int "user@hostname" 255 | |
| # |
| error_reporting = E_ALL | |
| display_errors = On | |
| display_startup_errors = On | |
| log_errors = On | |
| track_errors = On | |
| html_errors = On | |
| error_prepend_string = "<span style='color: #ff0000'>" | |
| error_append_string = "</span>" |
| #!/bin/bash | |
| # Sets up the directory tree and necessary files for unpriv LXC GUI containers. | |
| # Expects the default LXC setup (lxcbr0) to be functioning | |
| # Need to install desktop environment inside each container. | |
| UNAME="ubuntu" | |
| UHOME="/home/$UNAME" | |
| mkdir -p "$UHOME/.config/lxc" # /etc/lxc | |
| touch "$UHOME/.config/lxc/lxc.conf" # /etc/lxc/lxc.conf |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| iptables -A INPUT -p tcp -m multiport --dports 80,443 -s $(for ip in $(curl -s https://www.cloudflare.com/ips-v4); do echo -n "$ip,"; done|head -c-1) -j ACCEPT | |
| ip6tables -A INPUT -p tcp -m multiport --dports 80,443 -s $(for ip in $(curl -s https://www.cloudflare.com/ips-v6); do echo -n "$ip,"; done|head -c-1) -j ACCEPT |
| #!/bin/bash | |
| # Print the number of video frames in $1 | |
| ffprobe -count_frames -v error -select_streams v:0 -show_entries stream=nb_read_frames -of default=nokey=1:noprint_wrappers=1 ${1} |
| #!/bin/bash | |
| # uniq - The default version of the uniq command only finds uniques that are adjacent | |
| # and has no flag to find non-adjacent lines... so pretty useless. This is a | |
| # bash script that actually does what you would expect uniq to do. | |
| # for every piped in line: | |
| for w in $(cat); do | |
| # if we haven't already added it before | |
| if [[ "$(grep -o "$w" <<< "$once")" == "" ]]; then | |
| # add it + newline |
| ''' | |
| This script enables tab competion for functions in the Python2 interactive shell. | |
| It requires the readline and rlcompleter packages (install with pip) and set PYTHONSTARTUP | |
| to this file's location as an enironmental variable in your .bashrc file. | |
| ''' | |
| try: | |
| import readline | |
| except ImportError: | |
| pass |
| #!/bin/bash | |
| # Enables SSH on first boot by touching a blank file called `ssh` in the boot directory | |
| # Requies the $disk argument (in the format /dev/sdX) to be set or passed as the fisrt command line flag. | |
| disk="$disk$1" | |
| if [[ -z "$disk" ]]; then | |
| echo "You need to pass the install device (/dev/sdX) with the \$disk arg or as the 1st param" | |
| exit 1 | |
| fi |