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/local/bin/gawk -f | |
/neighbor|peer-as|description|apply-group|authentication-key/ { | |
out=""; | |
for (i=7; i<=NF; i++) { | |
out=out" "$i | |
} | |
gsub(/"/, "", out); | |
if ($6 == "neighbor") { |
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
bind-key 4-Up "bin/tile.sh top" | |
bind-key 4-Down "bin/tile.sh bottom" | |
bind-key 4-Left "bin/tile.sh left" | |
bind-key 4-Right "bin/tile.sh right" | |
bind-key C4-Up "bin/tile.sh top-right" | |
bind-key C4-Left "bin/tile.sh top-left" | |
bind-key C4-Down "bin/tile.sh bottom-left" | |
bind-key C4-Right "bin/tile.sh bottom-right" |
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/sh | |
# Franz Bettag <[email protected]> - August 2018 | |
# Script script migrates Zones/KVMs on Joyent SmartOS from one node to another. | |
# First it creates a new VM on the target from the same config as the original VM. | |
# It leaves out the nics section as to not run into any conflicts with the currently running machine. | |
# We then zfs send an intial snapshot of the original VM to the target. | |
# Then we shutdown the original VM and create another snapshot. | |
# After the last snapshot has been transferred, we update the new VM with nics and start it up. | |
# Cleanup of course. | |
# |
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/sh | |
# All available metadata within the sdc: namespace gets converted into vars. | |
VARS="uuid server_uuid datacenter_name alias billing_id brand cpu_shares create_timestamp dns_domain hostname image_uuid last_modified limit_priv max_locked_memory max_lwps max_physical_memory max_swap owner_uuid quota state tmpfs zfs_io_priority zonename zonepath" | |
E="{" | |
# The sdc: namespace. | |
for key in $VARS | |
do |
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/sh | |
LINES=150 | |
LOG=/logs/everything.log | |
IGNORE="'U7PG2|cron|no matching key|[Ii]nvalid user|preauth|Timeout before auth|service=retention|-- MARK --|Log statistics|ntpd|tsm1|last message repeated'" | |
CURLOG="egrep -ve $IGNORE $LOG | tail -n $LINES" | |
NOWLOG="tail -Fn 0 $LOG | egrep -ve $IGNORE" | |
ssh tail@data "$CURLOG && $NOWLOG" | ccze -A |
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
! logitech g610 multimedia keys | |
keycode 170 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume | |
keycode 92 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume | |
keycode 189 = XF86AudioPrev NoSymbol XF86AudioPrev | |
keycode 190 = XF86AudioNext NoSymbol XF86AudioNext | |
keycode 184 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause | |
keycode 207 = XF86AudioMute NoSymbol XF86AudioMute | |
keycode 147 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject |
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
# This is a shell archive. Save it in a file, remove anything before | |
# this line, and then unpack it by entering "sh file". Note, it may | |
# create directories; files and directories will be owned by you and | |
# have default permissions. | |
# | |
# This archive contains: | |
# | |
# databases | |
# databases/dalmatinerdb | |
# databases/dalmatinerdb/Makefile |
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
cat patterns/*/*|egrep -oe '(BASE10|INT|NUMBER|BASE16FLOAT):[^}]+'|grep :|sort|uniq |awk -F: '{if($1 == "NUMBER"||$1 == "BASE16FLOAT") print "\""$2"\" => \"float\""; else print "\""$2"\" => \"integer\""}' |
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/sh | |
# | |
# Dumps a subset of one Solr core and loads it into another one. | |
# | |
if [ $# -lt 4 ]; then | |
echo "Usage: $0 <source> <target> <limit> [core1 core2...]" | |
echo " $0 http://source.solr:8983/solr http://target.solr:8983/solr 100000 core1 core2" | |
exit 1 | |
fi |
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/sh | |
DEVICES=`/sbin/camcontrol devlist | /usr/bin/egrep -oe '\(\w*\d*'| /usr/bin/sed -e 's;^(;;g'` | |
for DEVICE in $DEVICES; do | |
NEED_SMART=`/sbin/camcontrol identify $DEVICE | /usr/bin/egrep -coe '^SMART.*yes.*no.*'` | |
if [ $NEED_SMART -eq 1 ] && [ -f "/usr/local/sbin/smartctl" ]; then | |
/usr/local/sbin/smartctl -s on /dev/$DEVICE | |
[ $? -eq 0 ] && echo "Enabled SMART for $DEVICE" 1>&2 # output to STDERR so people see it while piping ;) | |
fi |
NewerOlder