Skip to content

Instantly share code, notes, and snippets.

@skywalka
skywalka / gist:32d26d0432aa878cd85f1621291e9746
Created December 3, 2017 23:10 — forked from shacker/gist:87908e13c9ee6655ce90
Using the Workday API with Python and the suds client library
import sys
from suds import client
from suds.wsse import Security, UsernameToken
from suds.sax.text import Raw
from suds.sudsobject import asdict
from suds import WebFault
'''
Given a Workday Employee_ID, returns the last name of that employee.
[deployment-client]
clientName = SecondaryDeploymentServer
reloadDSOnAppInstall = true
[target-broker:PrimaryDeploymentServer]
targetUri = <deployment_master_fqdn>:<deployment_master_mgmt_port>
@skywalka
skywalka / australian-postcodes.sql
Created November 18, 2015 00:25 — forked from randomecho/australian-postcodes.sql
Australian postcodes (with states and suburb names) geocoded with latitude and longitude.
/*
Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod
May contain errors where latitude and longitude are off. Use at own non-validated risk.
*/
SET NAMES utf8;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS postcodes_geo;
#!/bin/bash
# Install Splunk 6.2 on CentOS 7 as a non-root user service that runs on boot with
# systemd. This script also opens the firewall to allow syslog on UDP port 514. Since
# we're running Splunk as non-root, this port is then forwarded to 5514. Configuring a
# syslog input in slunk on UDP 514 will gather this data. Must be run as root
#
# Usage: ./install_splunk.sh splunk.rpm
# Create Account
groupadd splunk
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
#! /bin/bash
# node deactivation for an all-in-one (aka monolithic) PE master
# ignores mcollective deactivation
# read certnames from STDIN (one per line) and deactivate
while read certname; do
/opt/puppet/bin/puppet license 2>&1 | head - -n2
/bin/su - peadmin -c "/opt/puppet/bin/mco service stop pe-puppet -I $certname"
/opt/puppet/bin/puppet node deactivate $certname
/opt/puppet/bin/puppet cert revoke $certname
#!/bin/bash
PUBDIR=$1
FINAL_DIR="/var/www/html/${PUBDIR}"
GRAPH_DIR="/var/opt/lib/pe-puppet/state/graphs/"
puppet apply -e "package {['httpd','graphviz']: ensure => present, }
service { 'httpd': ensure => 'running', }"
echo "publishing to $FINAL_DIR"
mkdir -p $FINAL_DIR
puppet apply --graph -e 'include ordering::mysql' && \
cd $GRAPH_DIR