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
<%= | |
class MyHash < Hash | |
def to_yaml( opts = {} ) | |
YAML::quick_emit( self, opts ) do |out| | |
out.map( taguri, to_yaml_style ) do |map| | |
keys.sort.each do |k| | |
v = self[k] | |
map.add( k, v ) | |
end | |
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
<%= | |
class MyHash < Hash | |
def initialize(hash) | |
@hash = hash | |
end | |
def test | |
@hash.is_a?(Hash) ? "yes" : @hash.class | |
end | |
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
$ mco inventory wrk4 -v | |
The inventory application failed to run, use -v for full error details: Received a processing error from RabbitMQ: 'Processing error' | |
Received a processing error from RabbitMQ: 'Processing error' (RuntimeError) | |
from /usr/share/mcollective/plugins/mcollective/connector/rabbitmq.rb:162:in `receive' <---- | |
from /usr/lib/ruby/1.8/mcollective/client.rb:89:in `receive' | |
from /usr/lib/ruby/1.8/mcollective/client.rb:152:in `req' | |
from /usr/lib/ruby/1.8/mcollective/client.rb:151:in `loop' | |
from /usr/lib/ruby/1.8/mcollective/client.rb:151:in `req' |
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
network_interface {"eth1": | |
ensure => up, | |
macaddress => 'aa:bb:cc:dd:ee:ff', | |
mtu => '1492', | |
onboot => true, | |
ipv4 => { | |
address => ['192.168.0.5/24'], | |
gateway => '192.168.0.1, | |
dhcp => 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
#!/bin/bash | |
RANGE=$1 | |
while read rev def; do | |
echo -n "Testing $rev ($def) " | |
git checkout $rev >/dev/null 2>/dev/null | |
make check > /dev/null 2>/dev/null | |
[[ $? != 0 ]] && echo "NOK" && exit 1 | |
echo "OK" |
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
STOMP error frame sent: | |
Message: "Processing error" | |
Detail: "Processing error\n" | |
Server private detail: {undef, | |
[{rabbit_auth_backend_ldap,check_user_login, | |
[<<"rpinson">>,[{password,<<"mypassword">>}]]}, | |
{rabbit_access_control, | |
'-check_user_login/2-fun-0-',4}, | |
{lists,foldl,3}, | |
{rabbit_stomp_processor,do_login,7}, |
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
module Test = | |
let number = [ label "number" . store Rx.integer . Util.eol ] | |
let lns = (Util.comment|Util.empty|number)* | |
let _ = print_endline (lens_format_atype lns) |
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 | |
BYLINE=0 | |
while getopts "l" opt; do | |
case $opt in | |
l) | |
BYLINE=1 | |
shift | |
;; |
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
$ cat /etc/passwd | auged --lens Passwd.lns set root/shell /bin/zsh | |
# passwd content with replacement | |
$ cat /etc/passwd | auged --lens Passwd.lns -f commands.augtool | |
# passwd content modified by commands.augtool commands | |
$ auged --lens Passwd.lns -i 'set root/shell /bin/zsh' /etc/passwd | |
# no output, replaces /etc/passwd in place | |
$ auged --lens Passwd.lns 'get root/shell' /etc/passwd | |
/bin/sh | |
$ auged --lens Passwd.lns 'get */shell' /etc/passwd | |
/bin/sh |
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 'openvz' | |
inventory = OpenVZ::Inventory.new() | |
inventory.load | |
hostnames=[] | |
inventory.to_hash.each do |k,v| | |
hostnames << v.config.hostname | |
end | |
puts hostnames.join(':') |