Skip to content

Instantly share code, notes, and snippets.

View turtlebender's full-sized avatar

Tom Howe turtlebender

  • Dell | Software
  • Chicago, IL
View GitHub Profile
@turtlebender
turtlebender / getcert.sh
Created August 6, 2015 13:42
Script for adding certificate to java trusted store
!/bin/bash
# This script will grab the certificate from the specified host and add it to the Java cacerts keystore
function usage
{
printf 'Usage: grab-cert.sh hostname port\n' >&2
exit 1
}

Keybase proof

I hereby claim:

  • I am turtlebender on github.
  • I am turtlebender (https://keybase.io/turtlebender) on keybase.
  • I have a public key whose fingerprint is 2B20 F017 7E71 6588 CE46 8947 131D C763 B006 6D4B

To claim this, I am signing this object:

import pywinauto.application
app = pywinauto.application.Application()
app.start_(ur"notepad.exe")
notepad = app.Notepad
notepad.edit.TypeKeys(u"I am typing s\xe4me text to Notepad\r\n\r\n"
"And then I am going to quit")
@turtlebender
turtlebender / gist:8787394
Created February 3, 2014 16:43
What do we need to do to make safeGitio actually return a value that can be consumed immediately?
safeGitio = (link) ->
gitio link, (err, data) ->
if err then link else data
@turtlebender
turtlebender / bootstrap.py
Created December 5, 2012 19:03
Bootstrap chef in Autoscaling Group
#!/usr/bin/env python
"""
This module will bootstrap a machine using chef. The purpose of this
script is actually to work with AWS Auto Scaling Groups. The user data
for the Launch Configuration is set to download this script and then
run it. This is also stores the results in a private gist and sends
a message to logstash with the results.
"""
@turtlebender
turtlebender / README.md
Created November 20, 2012 22:06
Add to your ~/.profile to easily activate the snake virtualenv

One thing people always want is the ability to easily use the virtualenv created by snakegit. Here is an easy way to accomplish that. If you add these functions to either your ~/.bash_profile or your ~/.profile file, then you will have 2 new commands you can run. N.B. you can call the functions whatever you want, but snakeskin and shed are kinda cute and came from Walt

# in your project directory call snakeskin to activate
function snakeskin()
{
  export OLDPATH=$PATH
  test -f snake.cfg || (echo "Not a snake project" ; return 0)
  test -f vendor/python/bin/activate || git snake build
  source vendor/python/bin/activate

export PATH=$PATH:~/.snakegit/bin

@turtlebender
turtlebender / chef_profile.py
Created September 24, 2012 15:46
Updated chef data bag script
#!/usr/bin/env python
"""
_chef_profile_
Generate a chef profile data bag
"""
import argparse
"{{name}}": {
"exchange": "{{exchange}}",
"binding_key": "{{binding_key}}"
},
@turtlebender
turtlebender / install_snakegit.py
Created September 17, 2012 20:14
Install snakegit
#!/usr/bin/env python
import os
import os.path
import subprocess
import sys
import tempfile
import urllib2
# Welcome message
install_message = '''
@turtlebender
turtlebender / install_snakegit.sh
Created September 10, 2012 20:23
Installs Snakegit
#!/usr/bin/env bash
# Welcome message
cat <<EOM
____ _ ____ _ _
/ ___| _ __ __ _| | _____ / ___(_) |_
\___ \| '_ \ / _' | |/ / _ \ | _| | __|
___) | | | | (_| | < __/ |_| | | |_
|____/|_| |_|\__,_|_|\_\___|\____|_|\__|