Skip to content

Instantly share code, notes, and snippets.

View mrjcleaver's full-sized avatar

Martin Cleaver mrjcleaver

View GitHub Profile
@charlesjohnson
charlesjohnson / gemrc.erb
Last active August 29, 2015 14:05
Use a .gemrc file with Omnibus chef-client
:sources:
- http://<%= node['gem_file']['host'] %>:<%= node['gem_file']['port'] %>/
@akesterson
akesterson / gist:11391984
Created April 29, 2014 06:22
Why I switched from bamboo to jenkins
TL;DR - It was proving to be more buildsystem than I needed,
and I had found that there were other buildsystems that met my needs
that I felt were lighter and more nimble. It's still a fine product
that I continue to recommend to this day, I just no longer see it as
"The One True Way".
=========================
1: Bamboo was consuming a significant amount of system resources,
@sr75
sr75 / wget-jdk-oracle-install-example.txt
Last active March 16, 2023 11:28
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu
@ericgray
ericgray / esxiso2pxe
Created March 17, 2014 18:21
Shell script that automates the process of extracting and modifying contents of ESXi ISO for install via PXE boot. See http://www.vcritical.com/2014/03/automatically-prepare-an-esxi-iso-image-for-pxe-booting/
#!/bin/bash
# esxiso2pxe - quickly extract contents of ESXi ISO image for use on a PXE server
# 17Mar2014 - egray
if [ $# != 3 ]; then
echo "Usage: $0 <tftpboot dir> <new dir name> <ESXi ISO file>" >&2
exit 1
fi
@rottenbytes
rottenbytes / check_ls.sh
Created November 12, 2013 19:59
Check if the logstash indexing is right on time
curl -s "a.b.c.d:9200/logstash-2013.11.12/_search?pretty" -d '{
"query": {
"match_all": {}
},
"from": 0,
"size": 1,
"fields": [ ],
"sort": {
"@timestamp" : "desc"
}
@jakeasmith
jakeasmith / .bash_aliases
Last active December 24, 2015 17:09
I used to have a bash profile somewhere with a lot of goodies in it, but it got lost in the shuffle between jobs this year. Feel free to copy, fork and do whatever you want with it. All I ask is that if you do something cool let me know so I can use it too!
# Colors
DARK_PURPLE="\[\033[1;34m\]"
GREEN="\[\033[0;32m\]"
GREY="\[\033[1;30m\]"
NORMAL="\[\033[0m\]"
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
# Git shortcuts
alias gci='git commit'
@bashcoder
bashcoder / logstash_apache_json_macro.conf
Created August 4, 2013 18:15
Logstash JSON logging in Apache, using mod_macro. Debugged and enhanced from the original version found at: http://cookbook.logstash.net/recipes/apache-json-logs/
# logstash_apache_json_macro.conf
#
# Create a Macro named logstash_log that is used in the VirtualHost
# It defines, on the fly, a macro for the specific vhost $servername
# and anchors its @source, $source_host and @source_path.
#
# In addition, it prevents any non-page resources from getting logged.
#
# It also adds three tags: web, apache, and the servername
#
@dodok1
dodok1 / gist:4352500
Last active February 19, 2018 19:02
prototype for confluence content parsing # Get Confluence XML Schema # Put confluence.dtd and xhtml-*.ent to your working directory # Try attached groovy script
import groovy.xml.XmlUtil
def content=new File(args[0]).getText()
def slurper = new XmlSlurper(false,false)
def prefix = """<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ac:confluence SYSTEM "confluence.dtd">
<ac:confluence xmlns:ac="http://www.atlassian.com/schema/confluence/4/ac/" xmlns:ri="http://www.atlassian.com/schema/confluence/4/ri/" xmlns="http://www.atlassian.com/schema/confluence/4/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.atlassian.com/schema/confluence/4/ac/ confluence.xsd">
"""
def suffix = "</ac:confluence>"
def xml = slurper.parseText(prefix+content+suffix)
@robinsmidsrod
robinsmidsrod / logstash.conf
Created December 5, 2012 13:01
Logging Windows event log information to Logstash using nxlog and JSON transport
input {
tcp {
type => "syslog"
host => "127.0.0.1"
port => 3514
}
tcp {
type => "eventlog"
host => "10.1.1.2"
port => 3515
@obscurerichard
obscurerichard / README.md
Created September 17, 2012 22:35
Simulates a low bandwidth, high-latency network connection

slow

This bash script offers quick shortcuts to simulate slower network connections. It is useful when you need to simulate a wireless network on a Linux network server, especially when you are using a virtual machine guest on your local machine or in the cloud.

slow 3G                   # Slow network on default eth0 down to 3G wireless speeds
slow reset                # Reset connection for default eth0 to normal
slow vsat --latency=500ms # Simulate satellite internet  with a high latency
slow dsl -b 1mbps         # Simulate DSL with a slower speed than the default

slow modem-56k -d eth0 # Simulate a 56k modem on the eth1 device. eth0 is unchanged.