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
#!/opt/puppet/bin/ruby | |
require 'mcollective' | |
require 'yaml' | |
include MCollective::RPC | |
WEBHOOK_CONFIG = '/etc/webhook.yaml' | |
ENV['HOME'] = '/var/lib/peadmin' | |
ENV['PATH'] = '/sbin:/usr/sbin:/bin:/usr/bin:/opt/puppet/bin' |
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
-- Simple Lua to Pause roku when door is unlocked. | |
-- http://sdkdocs.roku.com/display/sdkdoc/External+Control+Guide | |
-- load the http module | |
local http = require("socket.http") | |
http.request{ | |
method = "POST", | |
url = "http://roku.wallcity.org:8060/keydown/play", | |
headers = | |
{ | |
["Accept"] = "*/*", |
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
#!/opt/puppet/bin/ruby | |
require 'puppet' | |
require 'puppet/settings/ini_file' | |
path = Puppet::FileSystem.pathname(Puppet.settings.which_configuration_file) | |
puts path | |
file = Puppet::Settings::IniFile.parse(path) | |
puts file.setting('agent','environment').value |
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/ruby | |
require 'net/imap' | |
imap = Net::IMAP.new('imap.gmail.com', 993, true) | |
imap.login('[email protected]', 'wouldntyouliketoknow') | |
imap.select('Inbox') | |
# All msgs in a folder | |
msgs = imap.search(["SUBJECT", "Motion"]) | |
# Read each message |
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
run MainEntourageScript | |
script MainEntourageScript | |
(* Global Varibles Used in the Script*) | |
global TargetVersion | |
global theFullName | |
global theEmailAddr | |
global theAccountID | |
--LDAP Server Settings | |
global theLDAPserverName | |
global theLDAPServer |
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 | |
################################################################################# | |
# Mail Configuration Script Tiger Ed. v10.4.X version 0.139 Updated 11/12/06 # | |
################################################################################# | |
# # | |
# #### # | |
# #### papers (a) wallcity.org # | |
# #### #### # | |
# #### #### papers.wallcity.org # | |
# #### #### #### # |

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
#!/opt/puppet/bin/ruby | |
require 'puppet' | |
require 'yaml' | |
def yaml_check(file) | |
YAML.load_file(file) | |
rescue Exception => err | |
puts "YAML invalid: #{file}" | |
puts "ERROR: #{err}" | |
false |
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 | |
require 'rubygems' | |
require 'yaml' | |
require 'json' | |
def puppet_parser_validate(file) | |
system('puppet parser validate ' + file) | |
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
require 'ipaddr' | |
# Accessible in puppet as $::subnet | |
Facter.add(:subnet) do | |
setcode do | |
# Mapping of vlans to ipaddresses | |
# NOTE: To extend this fact, modify this hash | |
vlan_segments = { | |
'prod' => IPAddr.new('10.10.10/22'), | |
'dev' => IPAddr.new('11.11.11/22'), | |
'uat' => IPAddr.new('12.12.12/22'), |