This file contains 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 'rubygems' | |
require 'net/ldap' | |
ldap = Net::LDAP.new | |
ldap.host = 'foo.bar.stuff' | |
ldap.port = 636 | |
ldap.encryption :method => :simple_tls | |
ldap.auth 'cn=user, dc=foo, dc=bar', 'something-secret' | |
if ldap.bind |
This file contains 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 'digest/sha1' | |
require 'base64' | |
d = Digest::SHA1.new | |
hash = Base64.encode64(d.digest('something secret')) |
This file contains 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 'pp' | |
def apache_certs | |
certs = [] | |
if File.directory? '/etc/httpd/' | |
`find /etc/httpd -follow -iname '*.conf' 2>/dev/null`.each_line do |conf| | |
`grep -i SSLCertificateFile #{conf}`.each_line do |l| | |
next if l.strip.chomp =~ /^#/ | |
certs << l.split[1].chomp.strip | |
end |
This file contains 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
// Match all nodes with FQDN ending in example.com | |
function(doc) { | |
if(doc.attributes.fqdn) { | |
var prefix = doc.attributes.fqdn.match(/^.*example.com$/); | |
if(prefix) { | |
emit(prefix, null); | |
} | |
} | |
} | |
This file contains 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 'open-uri' | |
require 'restclient' | |
require 'json' | |
register_growl_events [:updating_feeds] | |
menu 'delicious.com' do |m| | |
end | |
menu_separator |
This file contains 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 'rubygems' | |
require 'howlingmine' | |
HowlingMine::Config.host = 'redmine.local' | |
HowlingMine::Config.port = 80 # default | |
HowlingMine::Config.use_ssl = false # default | |
HowlingMine::Config.project = 'howlingmine' | |
HowlingMine::Config.tracker = 'Bug' # default | |
# Add the generated Redmine API Key here | |
HowlingMine::Config.api_key = '23Sv8x982739749jjsdf' |
This file contains 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
cd /opt/redmine-0.8/vendor/plugins | |
git clone git://github.com/rubiojr/howlingmine-server.git | |
cd howlingmine-server | |
git co origin/hms-0.1.1 |
This file contains 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
09:51:37.793 [pool-4-thread-1] INFO c.a.virtualfactory.machine.impl.LibvirtMachine [LibvirtMachine.java:172] - Cloning the virtual machine: 0d0345e6-dd80-4dc2-a9b3-d42785827189 | |
09:53:02.100 [pool-4-thread-1] INFO c.a.virtualfactory.machine.impl.LibvirtMachine [LibvirtMachine.java:176] - Cloning successfully completed of virtual machine: 0d0345e6-dd80-4dc2-a9b3-d42785827189 | |
09:53:02.107 [pool-4-thread-1] ERROR c.a.virtualfactory.machine.impl.LibvirtMachine [LibvirtMachine.java:757] - Exception caught in parsing XML:java.lang.NullPointerException | |
09:53:02.119 [pool-4-thread-1] ERROR c.a.virtualfactory.machine.impl.LibvirtMachine [LibvirtMachine.java:193] - Failed to deploy machine :{} | |
com.abiquo.virtualfactory.exception.VirtualMachineException: java.lang.NullPointerException | |
at com.abiquo.virtualfactory.machine.impl.LibvirtMachine.defineXMLdomain(LibvirtMachine.java:758) [LibvirtMachine.class:na] | |
at com.abiquo.virtualfactory.machine.impl.LibvirtMachine.deployMachine(LibvirtMachine.java:179) [LibvirtMachine. |
This file contains 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
<interface type="bridge" name="br3"> | |
<start mode="onboot"/> | |
<mtu size="1500"/> | |
<bridge stp="off"> | |
<interface type="ethernet" name="wlan0"> | |
<mac address="B8:AC:6F:80:52:F7"/> | |
</interface> | |
</bridge> | |
</interface> |
This file contains 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
Traceback (most recent call last): | |
File "/usr/lib64/python2.4/site-packages/xen/xend/server/SrvDomainDir.py", line 127, in op_new | |
self.xd.domain_new(config) | |
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomain.py", line 1005, in domain_new | |
dominfo = XendDomainInfo.createDormant(domconfig) | |
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 253, in createDormant | |
vm = XendDomainInfo(domconfig) | |
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 437, in __init__ | |
self._checkName(self.info['name_label']) | |
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 3151, in _checkName |