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 | |
short_route() { | |
ip route | sed -n "s/$1 \\(.* dev [^ ]\\+\\).*/\\1/p" | head -n 1 | |
} | |
resolve_ip() { | |
local filter='/^[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$/{p;q;}' | |
[[ $(sed -n "$filter" <<<"$1") == "$1" ]] && echo "$1" || | |
host -t a "$1" | cut -d ' ' -f 4 | sed -n "$filter" |
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
# | |
# The following script will | |
# - Create Linux bridge $BR_WAN, $BR_LAN | |
# - Install IP addresses and basic routes | |
# - Enable proxy_arp on $BR_WAN | |
# - Enable ip_forward | |
# - Enable MASQUERADE on $IF_INET | |
# - $BR_LAN, $BR_WAN has to be allowed in ~/.usr/etc/qemu/bridge.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
cp target.service /usr/lib/systemd/system/ | |
cd /etc/systemd/system/multi-user.target.wants | |
ln -sf /usr/lib/systemd/system/target.service . | |
$ cat target.service | |
[Unit] | |
Description=Restore LIO kernel target configuration | |
Requires=sys-kernel-config.mount | |
After=sys-kernel-config.mount network.target local-fs.target |
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 | |
set -e | |
DEFAULT_PACKAGES=ssh,language-pack-en-base | |
DEFAULT_COMPONENTS=main,universe | |
DEBOOTSTRAP=/usr/sbin/debootstrap | |
DEFAULT_MIRROR=http://archive.ubuntu.com/ubuntu | |
DEFAULT_VARIANT=minbase | |
MIRROR=${STRAP_MIRROR:-$DEFAULT_MIRROR} | |
ROOTFS=$1 |
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
pip uninstall -y rtslib-fb==2.1.49 | |
sudo apt-get remove -y lio-utils | |
sudo apt-get install -y python-prettytable python-ipaddr python-netifaces python-configobj python-pyparsing python-epydoc texlive-latex-base texlive-latex-extra texlive-latex-recommended lmodern texlive-fonts-recommended python-urwid | |
rm -rf rtslib | |
git clone https://github.com/Datera/rtslib | |
cd rtslib; make deb; sudo apt-get -y remove rtslib ; dpkg -i dist/*.deb; cd .. | |
rm -rf configshell | |
git clone https://github.com/Datera/configshell |
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
#~/.mutt/aliases | |
alias nick Nicholas Levandoski <[email protected]> | |
alias tim Timothy Pitt <[email protected]> | |
alias steven Steven Jackson <[email protected]> | |
alias kaleb Kaleb Hornsby <[email protected]> | |
alias alug-admin nick, tim, steven |
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
resolver 8.8.8.8; | |
location /video/ { | |
if ($request_uri ~ "^/video/(.+?)/.+") { | |
set $upstream_host $1.googlevideo.com; | |
add_header Content-Disposition "attachment; filename=video.mp4;"; | |
} | |
rewrite /video/.+?/(.+)$ /$1 break; | |
proxy_buffering off; | |
proxy_pass https://$upstream_host; | |
proxy_set_header Host $upstream_host; |
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
#!/usr/sbin/dtrace -s | |
dtrace:::BEGIN | |
{ | |
num=0; | |
} | |
pid$target::di_init:entry | |
{ | |
self->ts = timestamp; | |
/* self->vts = vtimestamp; */ | |
} |
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
nip=10.113.194.153/24 | |
ngateway=10.113.194.1 | |
# http://blog.allanglesit.com/2012/05/solaris-11-dns-client-configuration-using-svccfg/ | |
ipadm delete-addr net0/v4 | |
ipadm create-addr -T static -a $nip net0/v4 | |
svccfg -s svc:/network/dns/client setprop config/search=\(cn.oracle.com us.oracle.com oracle.com\) | |
svccfg -s svc:/network/dns/client setprop config/nameserver=net_address: \(10.182.244.34 10.182.96.20 192.135.82.84\) | |
svccfg -s name-service/switch setprop config/ipnodes = astring: '("files dns")' | |
svccfg -s name-service/switch setprop config/host = astring: '("files dns")' |