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 python | |
| import pprint | |
| import dns.resolver | |
| hostname = "hostname here" | |
| resolver = dns.resolver.Resolver() | |
| resolved_ip_list = [] | |
| answers = resolver.query(hostname, 'A') | |
| for rdata in answers: |
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 python | |
| import pprint | |
| import Globals | |
| from Products.ZenUtils.ZenScriptBase import ZenScriptBase | |
| from transaction import commit | |
| dmd = ZenScriptBase(connect=True).dmd | |
| find = dmd.Devices.findDevice |
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
| 1. Installed using auto deploy tool | |
| 2. Stopped Zenoss | |
| 3. touch /opt/zenoss/etc/DAEMONS_TXT_ONLY | |
| 4. Create /opt/zenoss/etc/daemons.txt with: | |
| zenping | |
| zensyslog | |
| zenstatus | |
| zentrap | |
| zenmodeler | |
| zenrender |
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
| 59 current_account = '' | |
| 60 case line | |
| 61 when /^\[(.*)\]$/ | |
| 62 account_name = (line.match(/^\[(.*)\]$/).captures)[0] | |
| 63 p 'account_name = ' + account_name | |
| 64 current_account = account_name | |
| 65 p 'current_account = ' + current_account | |
| 66 @accounts[current_account] = {} unless @accounts.has_key? current_account | |
| 67 when /^aws_access_key_id=.*$/ | |
| 68 aws_access_key_id = (line.match(/^aws_access_key_id=(.*)$/).captures)[0] |
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 | |
| outdir=$1 | |
| if [ -z "${outdir}" ]; then | |
| outdir=/tmp/ | |
| fi | |
| cd ${outdir} | |
| openssl genrsa -out pk-amazon.pem 2048 |
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
| source 'http://rubygems.org' | |
| gem 'rails', '3.2.9' | |
| gem 'sqlite3' | |
| # Use unicorn as the web server | |
| # gem 'unicorn' | |
| # Deploy with Capistrano | |
| # gem 'capistrano' |
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
| nssm_service "chef-client" do | |
| application "C:/opscode/chef/embedded/bin/ruby.exe" | |
| options "C:/opscode/chef/bin/chef-client -C C:/chef/client.rb -i 1800 -s 120" | |
| end | |
| service "chef-client" do | |
| action :nothing | |
| only_if { WMI::Win32_Service.find(:all).collect{|s| s.name}.include?("chef-client") } | |
| end |
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
| /* | |
| * Somewhere in their bootstrap code, index.php or wherever, we'd register a shutdown | |
| * callback that is executed when PHP completes serving the request (whether successfully, | |
| * or in the event of a fatal error. | |
| */ | |
| register_shutdown_function('requestShutdown'); | |
| function requestShutdown() { | |
| $error = error_get_last(); |
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
| O2: Just a little reminder. We're automatically giving you 10% of July's subscription back on your September bill. Find out more at http://blog.o2.co.uk |
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
| ➜ django-ukgeocode git:(develop) ✗ sudo gem install ruby-shadow | |
| Password: | |
| Building native extensions. This could take a while... | |
| ERROR: Error installing ruby-shadow: | |
| ERROR: Failed to build gem native extension. | |
| /Users/maxmanders/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb | |
| checking for getspent() in -lshadow... no | |
| checking for getspent()... no | |
| checking for fgetspent()... no |