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
param( | |
[string]$machineName, | |
[string]$desiredVersion, | |
[string]$environmentString, | |
[string]$project | |
) | |
Import-Module Octopus-Cmdlets | |
#$machineName = 'DOGEN09' |
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
cd /var/lib/graphite/whisper/teamcity | |
for f in $(find $1 -iname "*.wsp") | |
do | |
if [ -a $f ] | |
then | |
# the retention policy should match what's in your /etc/carbon/storage-schemas.conf | |
/root/source/graphite-project/bin/whisper-resize.py $f 1m:7d 5m:28d 15m:1y | |
fi | |
done | |
chown -R _graphite:_graphite /var/lib/graphite/whisper |
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
pid=$(ps aux | grep [s]nmpd | awk -F' ' '{print $2}') && pmap -x $pid | grep total |
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 | |
# Thanks to androidyue on stackoverflow http://stackoverflow.com/questions/2903354/bash-script-to-check-running-process | |
ps_out=`ps -ef | grep $1 | grep -v 'grep' | grep -v $0` | |
result=$(echo $ps_out | grep "$1") | |
if [[ "$result" != "" ]];then | |
echo "$1 Running" | |
exit 0 | |
else | |
echo "$1 Not Running" | |
exit 2 |
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/bin/env python | |
""" | |
This script checks the output of the local | |
'df -P' command and reports the disk usage | |
for the given mount with perfdata. | |
Usage: | |
python check_df_usage.py | |
OK /dev/mapper/centos-root filesystem mounted on / usage percentage is 17 ; | 'used_percentage'=17;90;95;; 'size'=14530560KB;;;; 'used'=2360596KB;;;; 'available'=12169964KB;;;; |
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
import graphitesend | |
import redis | |
import os | |
import time | |
import sys | |
pattern = '%Y-%m-%d %H:%M:%S' | |
g = graphitesend.init(prefix='devops.dotshipper',graphite_server='dograph2.docl.nic') |
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/bin/env python | |
''' | |
quick script to use to check whether or not a port is open using python standard library, | |
good for when telnet is unavailable and it's too much trouble to install it | |
Usage: ./check_port.py 127.0.0.1 5601 | |
Thanks to mrjandro on SO | |
http://stackoverflow.com/questions/19196105/python-how-to-check-if-a-network-port-is-open-on-linux | |
sample output: | |
{"exit_code": 1, "results": "Port not open", "port": 5672, "host_ip": "['11.22.111.200']", "address": "internal-lb-1912362693.us-east-1.elb.amazonaws.com"} |
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 | |
#Binary built in alpine docker causes OOM exceptions in runtime on c3.xl centos7 (self.golang) | |
#submitted 9 hours ago | |
#If I build on the c3.xl it's fine. Everything I'm reading about cross compilation involves building from nix to Windows/ Darwin but not much about platform. I'm woefully ignorant here. | |
#Anyone have tips for reading resources? | |
#2 commentsshare | |
#all 2 comments | |
#sorted by: best | |
#[–]kron4eg 3 points 4 hours ago |
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
// vertSplitter parses an AWS credentials file and splits the sections | |
// up based on profiles. It then parses each section to build a | |
// JSON profile struct for each profile including comments. | |
package main | |
import ( | |
"bufio" | |
"encoding/json" | |
"fmt" |
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
FROM ruby | |
RUN gem install vimgolf | |
RUN apt-get update | |
RUN apt-get install vim -y | |
ENTRYPOINT /bin/bash |
OlderNewer