Skip to content

Instantly share code, notes, and snippets.

View jglenn9k's full-sized avatar

James Glenn jglenn9k

View GitHub Profile
@jglenn9k
jglenn9k / ips.sh
Created February 3, 2014 18:22
Scans a Class C for IP addresses
for i in $(seq 1 253); do x=$(arping -c 3 192.668.1.$i | awk '{ if ($0 ~ "^Unicast reply") { print $4" "$5 } }' | sort -u); [ "$x" ] && echo $x || echo 192.168.1.$i FREE; done

Keybase proof

I hereby claim:

  • I am thedonkdonk on github.
  • I am thedonkdonk (https://keybase.io/thedonkdonk) on keybase.
  • I have a public key whose fingerprint is 0554 1069 345F E09C FC0D C4CA BD74 E5DA E35F 7503

To claim this, I am signing this object:

@jglenn9k
jglenn9k / java.pp
Created October 14, 2014 18:15
Install jdk on Windows
class 'winjdk' {
case $architecture {
'x64': {
package { 'Java SE Development Kit 7 Update 67 (64-bit)':
ensure => '1.7.0.670',
source => 'C:\Installers\jdk-7u67-windows-x64.exe',
name => 'Java SE Development Kit 7 Update 67 (64-bit)',
install_options => {
'REBOOT' => '0',
'WEB_ANALYTICS=' => '0',
for i in $(seq 1 253); do x=$(arping -c 3 10.200.61.$i | awk '{ if ($0 ~ "^Unicast reply") { print $4" "$5 } }' | sort -u); [ "$x" ] && echo $x || echo 10.200.61.$i FREE; done > freeips.txt
@jglenn9k
jglenn9k / iptables
Created November 5, 2014 21:30
Default firewall rules for Managed Operations public cloud Linux server at Rackspace.
# Generated by iptables-save v1.4.7 on Wed Nov 5 21:23:26 2014
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -s 72.3.128.84/32 -m comment --comment "Rackspace Support" -j ACCEPT
-A INPUT -s 69.20.0.1/32 -m comment --comment "Rackspace Support" -j ACCEPT
-A INPUT -s 69.20.3.135/32 -m comment --comment "Rackspace Support" -j ACCEPT
-A INPUT -s 120.136.34.22/32 -m comment --comment "Rackspace Support" -j ACCEPT
-A INPUT -s 212.100.225.49/32 -m comment --comment "Rackspace Support" -j ACCEPT
[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet
# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet
# Where SSL certificates are kept.
[production]
modulepath = $confdir/environments/production/modules:$condfir/modules
manifest = $confdir/environments/production/manifests
@jglenn9k
jglenn9k / .vimrc
Created September 23, 2013 00:03
My .vimrc
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
@jglenn9k
jglenn9k / ansi.py
Created October 12, 2013 03:57
ANSI color codes for python.
#!/usr/bin/python
class ANSI:
"""
Not all of these colors work for every shell.
"""
esc = "\x1b"
blackf = esc + "[30m"
redf = esc + "[31m"
@jglenn9k
jglenn9k / tomcat.sh
Created October 28, 2013 02:06
Tomcat init script for CentOS 6.
#!/bin/bash
# chkconfig: 234 20 80
# description: Tomcat Server basic start/shutdown script
# processname: tomcat
# Pulled from http://www.rackspace.com/knowledge_center/article/centos-tomcat-6
# Extra edits by James Glenn <thedonkdonk@gmail.com>
# See http://blog.ablackhat.net/2013/10/27/install-tomcat-on-centos/
# This usually works for JAVA_HOME
JAVA_HOME=/usr/java/latest
export JAVA_HOME