1 You must agree that your name will be added to a file named AUTHORS.
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 | |
import sys | |
a_newer = 1 | |
b_newer = -1 | |
a_eq_b = 0 | |
def stringToEVR(verstring): | |
if verstring in (None, ''): | |
return ('', '', '') |
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 | |
# Transfer a Live image so that it's bootable off of a USB/SD device. | |
# Copyright 2007-2012 Red Hat, Inc. | |
# | |
# Jeremy Katz <katzj@redhat.com> | |
# Brian C. Lane <bcl@redhat.com> | |
# | |
# overlay/persistence enhancements by Douglas McClendon <dmc@viros.org> | |
# GPT+MBR hybrid enhancements by Stewart Adam <s.adam@diffingo.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
tsd.core.auto_create_metrics=true | |
tsd.core.meta.enable_realtime_ts=false | |
tsd.core.meta.enable_realtime_uid=false | |
tsd.core.meta.enable_tsuid_incrementing=false | |
tsd.core.meta.enable_tracking=false | |
tsd.core.plugin_path= | |
tsd.core.tree.enable_processing=false | |
tsd.http.cachedir=/tmp/tsd | |
tsd.http.request.cors_domains=* | |
tsd.http.request.enable_chunked=true |
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 get_nn_stack.sh | |
#!/bin/bash | |
pid=$(ps ax|grep namenode.NameNode|grep -v grep|awk '{print $1}') | |
topinfo=$(top -H -p $pid -b -n 3|grep -A1 'PID USER'|tail -1|awk '{print $1,$9}') | |
thread=$(echo $topinfo|awk '{print $1}') | |
cpu=$(echo $topinfo|awk '{print $2}') | |
echo $cpu | |
if [[ $(python -c "print $cpu > 70") = True ]]; then |
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 | |
# /etc/init.d/jenkins | |
# debian-compatible jenkins startup script. | |
# Amelia A Lewis <alewis@ibco.com> | |
# | |
### BEGIN INIT INFO | |
# Provides: jenkins | |
# Required-Start: $remote_fs $syslog $network | |
# Required-Stop: $remote_fs $syslog $network | |
# Default-Start: 2 3 4 5 |
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 | |
#!/bin/sh | |
# this script sets the TTL(in seconds) value on the tsdb column family in HBase. | |
TTL=$1 | |
if ! [[ $TTL =~ ^[1-9][0-9]*$ ]] ; then | |
echo "Invalid TTL value (expecting a postive integer)" 1>&2 | |
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
/etc/nginx/conf.d/git.conf | |
server { | |
listen 443; | |
server_name git.test.net; | |
root /data/web; | |
charset utf-8; | |
index index.html; | |
access_log /var/log/nginx/git_access.log; |
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
function is_ip() { | |
local ip=$1 | |
local stat=1 | |
if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then | |
OIFS=$IFS | |
IFS='.' | |
ip=($ip) | |
IFS=$OIFS | |
[[ ${ip[0]} -le 255 && ${ip[1]} -le 255 \ |
NewerOlder