Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am datherra on github.
  • I am datherra (https://keybase.io/datherra) on keybase.
  • I have a public key ASCaRHtjz7DUuKfkohrO1aGXgwES4rOuGJYexPS3ue5ovgo

To claim this, I am signing this object:

@datherra
datherra / README.md
Created July 31, 2016 17:07 — forked from trinitronx/README.md
A shell script to install latest Ansible via pip + dependencies

omnibus-ansible

Install latest Ansible via pip + dependencies via a shell script

This file is used to install ansible in test kitchen when you set in the kitchen.yaml file

require_ansible_omnibus: true

By default test kitchen will always download and use the latest version of this install file.

WARNING: AS SOON AS YOU MERGE CODE HERE IT IS INSTANTLY AVAILABLE TO EVERYONE DOING OMNIBUS KITCHEN ANSIBLE INSTALLS:

@datherra
datherra / downloadWeblogic.gradle.groovy
Created December 7, 2015 06:47
Gradle Download file / dependencies outside of repos
ext {
wlsInstaller = 'wls1036_dev.zip'
wlsInstallerSourceUrl = "http://mysever/content/com/oracle/weblogic/wls/10.3.6/${wlsInstaller}"
localEnvDir = "${projectDir}/.local"
wlsInstallerDestPath = "${localEnvDir}/${wlsInstaller}"
wlsHome = "${localEnvDir}/wls1036_dev/"
}
def download(String remoteUrl, String localUrl) {
def localFile = new FileOutputStream(localUrl)
GET /wls_configs/machines
{
"items": [
"DEV99m1",
"DEV14m1",
"DEV12m1",
"DEV11m1",
"DEV10m1"
],
"_links": {
GET /wls_configs/machines
[
{
"machine": "DEV99m1",
"_links": {
"self": {
"title": "machines",
"uri": "/wls_configs/machines"
},
"item": [
@datherra
datherra / ansible_generated
Created October 27, 2014 12:51
Jinja2 and white space control
[cluster]
wls.domain.cluster.name=wlsCluster
wls.domain.cluster.fqdn=my.cluster
wls.fe.server1=fe_server1
wls.fe.server1.port=8081
wls.fe.server1.address=my.server
wls.be.server1=fe_server1
wls.be.server1.port=8081
wls.be.server1.address=my.server
@datherra
datherra / let_me_crazy.sh
Created February 18, 2014 16:36
Script that generates CPU and disk activity to troubleshooting with Unix utilities
#!/bin/bash
stress -c 28 -q &
dd if=/dev/zero of=/var/log/$$ bs=4M > /dev/null 2>&1 &
#!/bin/bash
mkdir -p trash
LOG=trash/$$_my_script.log
echo "Started" >> $LOG
echo "Find my log file investigating my source ;)"
sleep 120
@datherra
datherra / shrink-vbox.sh
Created August 16, 2013 03:09
Very nice script to shrink the size of you Vagrant box before distribution. http://vstone.eu/reducing-vagrant-box-size/
cat - << EOWARNING
Author: @Jan_vStone
WARNING: This script will fil up your left over disk space.
DO NOT RUN THIS WHEN YOUR VIRTUAL HD IS RAW!!!!!!
You should NOT do this on a running system.
This is purely for making vagrant boxes damn small.
Press Ctrl+C within the next 10 seconds if you want to abort!!
@datherra
datherra / looping_accesslogs.sh
Created May 25, 2012 18:15
looping through some access_logs
#!/usr/bin/sh
for sistema in sistema1 sistema2 sistema3 sistema4 sistema5 ; do
for host in `ls -d $sistema/sne*`; do
# for host in `ls -d sne*`; do
for file in `ls $host`; do
echo $host/$file | egrep -q gz$
if [ $? -eq 0 ] ; then
gzcat $host/$file| awk '{if ($1 ~ /[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/) {
sub(/\[/,"",$4)
sub(/\"/,"",$6)