This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * object.watch polyfill | |
| * | |
| * 2012-04-03 | |
| * | |
| * By Eli Grey, http://eligrey.com | |
| * Public Domain. | |
| * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import boto | |
| # based on http://www.quora.com/Amazon-S3/What-is-the-fastest-way-to-measure-the-total-size-of-an-S3-bucket | |
| # assumes you've already configured your access id & secret key | |
| s3 = boto.connect_s3() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # | |
| # this is a special meta-check. It runs ping checks against all hosts in | |
| # the /endpoints API and sends individual results directly to sensu-client via | |
| # the udp/3030 client socket. this is different from the normal sensu check model | |
| # where individual scripts run and their exit status and output is used to create | |
| # a single event. | |
| # | |
| # the reason for this check is to be able to dynamically ping a list of hosts | |
| # without the race conditions and timing issues involved with creating individual |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is the basic structure for a Windows project puppet module at Softek | |
| # We found that the Package type as provided by Puppet was not quite sufficient for our needs. | |
| # Instead, we transfer the file, exec msiexec when it changes (while logging install output), and then ensure the service is running. | |
| class some_project { | |
| $installer = 'Project.Setup.msi' | |
| $url = "puppet:///release/${installer}" | |
| file { "c:/packages/${installer}": | |
| ensure => 'file', | |
| mode => '1777', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # Get the value of a tag for a running EC2 instance. | |
| # | |
| # This can be useful within bootstrapping scripts ("user-data"). | |
| # | |
| # Note the EC3 instance needs to have an IAM role that lets it read tags. The policy | |
| # JSON for this looks like: | |
| # | |
| # { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <kml xmlns="http://www.opengis.net/kml/2.2"> | |
| <Document> | |
| <name>Australia State Polygon (Simplified with Overlaps)</name> | |
| <description>Australia State Boundaries</description> | |
| <Style id="polyStyID_0"> | |
| <LineStyle> | |
| <color>66000000</color> | |
| <width>2</width> | |
| </LineStyle> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 | |
| # Create Account | |
| useradd splunk | |
| groupadd splunk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
OlderNewer