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:
# Add these lines to the container's config | |
lxc.cgroup.devices.allow = c 10:200 | |
lxc.hook.start /usr/local/bin/mktun |
''' | |
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 | |
# 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 |
#!/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 |
I hereby claim:
To claim this, I am signing this object:
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 | |
# 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 | |
# |
#!/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" |
#!/usr/bin/env python3 | |
# | |
# Accepts a JSON file path as an optional argument, otherwise reads stdin | |
import os | |
import simplejson | |
import sys | |
import yaml | |
# If valid path to json file is passed |
#!/bin/bash | |
grep -Li 'nodisplay=true' /usr/share/applications/*.desktop |