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 | |
# A POSIX variable | |
OPTIND=1 # Reset in case getopts has been used previously in the shell. | |
# Initialize our own variables: | |
unreg=0 | |
error=0 | |
max_ratio=0 | |
target_tracker="" | |
days_ago=0 |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCd9MR4lTtEreJqyXWjVRxxMzYMUxYTLr0PMDkY52BgiBVHL+JY8Pbx7hcEaSkd9wMlun6Jverq3QYXUk+1FOOBJwC/ATZloCav0sqn9/37QrMvBPcwHgH054abKZJ0ctkpBTUa7AS+IRtco30i7J7Irzr6jbRvZ2BO6Nh1TlhGBQ0y5IOEMBhWMq9sUXBNmsNxDSGaabEX83Dkgk4pkTtr4Sk0oUpWWI94E3zttYAP6e7gRhiOn6LeYiDfTvIRkN9c/scErs1W3Pa6WY0EWLR7TeVtSWVEo5QIYbJbXRJTOCWyoMc8u5f9c82kIPG+4Ufe9wLUd7t2kVUDh6v89Ord daleha@trololol |
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
rasplex Version: 0.5.1 | |
rasplex git: 55113f6ddae290c431fdf96171c28c1778fbe1ff | |
RasPlex:~ $ ls | |
lost+found | |
RasPlex:~ $ cd /flash/overlays/ | |
RasPlex:/flash/overlays $ ls | |
README.TXT hifiberry-dac-overlay.dtb iqaudio-dac-overlay.dtb pcf2127-rtc-overlay.dtb w1-gpio-overlay.dtb | |
ds1307-rtc-overlay.dtb hifiberry-dacplus-overlay.dtb iqaudio-dacplus-overlay.dtb pcf8523-rtc-overlay.dtb w1-gpio-pullup-overlay.dtb | |
hifiberry-amp-overlay.dtb hifiberry-digi-overlay.dtb lirc-rpi-overlay.dtb pps-gpio-overlay.dtb |
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
# Update glibc to your systems recommended patched version first | |
# As root, run this. If you're system is ok, you'll see nothing. Otherwise, this will tell you all infected processes. | |
for proc in $(ls /proc); do if [ -e /proc/$proc/maps ];then if [ -n "`cat /proc/$proc/maps | grep -i libc- | grep -i deleted`" ];then echo $proc; echo "CMDLINE"; cat /proc/$proc/cmdline; echo -e "CMDLINE\n"; cat /proc/$proc/maps | grep -i libc- | grep -i deleted; fi fi done |
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
# Description: | |
# Query Datadog using Hubot. | |
# | |
# Configuration: | |
# HUBOT_DATADOG_APIKEY - Your Datadog API key | |
# HUBOT_DATADOG_APPKEY - Your Datadog app Key | |
# | |
# Commands: | |
# opsbot (datadog|dd|dog|graph) [dashboard] [graph] - snapshot a specific graph from a dashboard that you've already told hubot about. | |
# opsbot (datadog|dd|dog) graphs - Show the available graphs |
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
# Description: | |
# This script can be used to interact with VictorOps schedules, and page VictorOps teams | |
# | |
# Configuration: | |
# HUBOT_VICTOROPS_USER - The username of the hubot user in the VictorOps org | |
# HUBOT_VICTOROPS_PASS - The password of the hubot user in the VictorOps org | |
# HUBOT_VICTOROPS_REST - The API token to use | |
# Commands: | |
# hubot oncall - Lists the teams you can check (working) |
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
checklength = (url) -> | |
robot.http(result['snapshot_url']).get() (err,res,body) -> | |
size = res['headers']['content-length'] | |
checklength url unless size > 1000 | |
if size > 1000 | |
setTimeout -> | |
msg.send "Here's your graph for #{dash} #{graph}, #{msg.message.user.name}: #{result['snapshot_url']}" | |
, 3000 |
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 -x # verbosity | |
# This script is meant to be run from inside alchemy linux, our PXE rescue system. | |
# To boot into alchemy, connect to a serial console with ipmitool sol activate, and set the bootdev with 'chassis bootdev pxe' | |
# The default user:pass is alchemy:transmute | |
# This script covers swapping out the OS drive of a hadoop node, and is very coupled to this task. The individual sections however may be reused. | |
# This script should never be run without being watched, and should never be run all at once. Run each section on its own. Ye be warned. | |
# The first step is to pick a data drive to remove. We'll need to find out the serial for that drive. The only mapping between the physical and logical here is done through "megaraid target id's", which map to the scsi sub slot. Sound confusing? Don't worry, that's because it is, so we'll confuse it more by using the folliwng magical regex: |
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 | |
cp /etc/fstab /etc/fstab.bak | |
while read line; do | |
drive=$(echo $line | awk '{print $1}') | |
if [[ $drive =~ /dev/sd.* ]];then | |
uuid=$(blkid | grep $drive | sed 's/.*\sUUID="\([a-zA-Z0-9-]*\)".*/\1/g') | |
sed -i "s:$drive:UUID=$uuid:g" /etc/fstab | |
fi | |
done < /etc/fstab |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. |