Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View itxx00's full-sized avatar
✈️
keep working

itxx00 itxx00

✈️
keep working
View GitHub Profile
#!/usr/bin/env python
import sys
a_newer = 1
b_newer = -1
a_eq_b = 0
def stringToEVR(verstring):
if verstring in (None, ''):
return ('', '', '')
@itxx00
itxx00 / gist:9467325
Created March 10, 2014 15:37
livecd-iso-to-disk
#!/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>
#
#!/bin/bash
menu_select() {
declare -a menu
local options="$@"
menu=($options)
cur=0
draw_menu() {
for i in "${menu[@]}"; do

1 You must agree that your name will be added to a file named AUTHORS.

@itxx00
itxx00 / opentsdb.conf
Created April 15, 2019 08:54 — forked from kylebrandt/opentsdb.conf
OpenTSDB Configuration
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
@itxx00
itxx00 / get_nn_stack.sh
Last active March 28, 2019 09:54
get_nn_stack.sh
$ 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
@itxx00
itxx00 / jenkins.sh
Created June 30, 2015 02:57
init scripts
#!/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
#!/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
@itxx00
itxx00 / gist:b09b8eb9a5528c0d7aff
Created April 16, 2015 07:40
nginx fcgiwrap git-http-backend setup on CentOS6
/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;
@itxx00
itxx00 / common.sh
Last active April 27, 2017 11:52
common.sh
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 \