Skip to content

Instantly share code, notes, and snippets.

View raphink's full-sized avatar
🐝
eBPF everything!

Raphaël Pinson raphink

🐝
eBPF everything!
View GitHub Profile
#!/bin/bash
PDF=$1
if [ -z $PDF ]; then
echo "Usage: $0 <file.pdf>"
exit 1
fi
NAME=${PDF%%.pdf}
(*
Module: Bacula
Parses: /etc/bacula/*.conf
Author: Domen Kožar <[email protected]>
About: Reference
This lens tries to be ...
About: License
if not before.nil?
# Insert before given path
aug.insert(before, "path", true)
entry_path = "#{fpath}/path[count(*)=0]"
elsif not after.nil?
# Insert after given path
aug.insert(after, "path", false)
entry_path = "#{fpath}/path[count(*)=0]"
end
[root@centos6-x86_64 ~]# /usr/bin/yum -d 0 -e 0 -y install mod_auth_cas
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
The GPG keys listed for the "Extra Packages for Enterprise Linux 6 - x86_64" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.
# puppet resource puppet_auth
puppet_auth { 'Auth rule for /':
ensure => 'absent',
}
puppet_auth { 'Auth rule for /certificate/':
ensure => 'absent',
}
puppet_auth { 'Auth rule for /certificate/ca':
ensure => 'absent',
}
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:55)
Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 1 more
@raphink
raphink / gist:4123876
Created November 21, 2012 08:52
Proposition for a setlist API entry

Proposition for a setlist API entry

In order to easily manage multiple entries in the tree, it would be useful to have a setlist API entry, which would manage both named nodes as well as seq ones. It could look like this:

setlist <path> <label|seq> <replace|add|merge> <value> [value [value […]]]

For example, having /files/etc/ssh/sshd_config/AcceptEnv as:

{ "AcceptEnv"

tcp 0 0 localhost:47708 localhost:61614 ESTABLISHED
tcp 0 0 localhost:47725 localhost:61614 ESTABLISHED
tcp 0 0 localhost:47707 localhost:61614 ESTABLISHED
tcp 0 0 localhost:47740 localhost:61614 ESTABLISHED
tcp 0 0 localhost:47715 localhost:61614 ESTABLISHED
tcp6 96 0 localhost:61614 localhost:47708 ESTABLISHED
tcp6 94 0 ip-10-49-21-59.eu:61614 ip-10-49-21-59.eu:40823 CLOSE_WAIT
tcp6 96 0 localhost:61614 localhost:47740 ESTABLISHED
tcp6 1 0 ip-10-49-21-59.eu:61614 ip-10-49-21-59.eu:40806 CLOSE_WAIT
tcp6 96 0 localhost:61614 localhost:47715 ESTABLISHED
D, [2012-11-30T09:38:27.661195 #21197] DEBUG -- : psk.rb:98:in `callerid' Setting callerid to uid=0 based on callertype=uid
D, [2012-11-30T09:38:27.661333 #21197] DEBUG -- : runnerstats.rb:49:in `received' Incrementing total stat
D, [2012-11-30T09:38:27.661547 #21197] DEBUG -- : base.rb:68:in `publish' Sending registration a9da6331d24aa3660126292da3bceeb9 to collective mcollective
D, [2012-11-30T09:38:27.661718 #21197] DEBUG -- : pluginmanager.rb:83:in `[]' Returning cached plugin security_plugin with class MCollective::Security::Psk
D, [2012-11-30T09:38:27.661951 #21197] DEBUG -- : pluginmanager.rb:83:in `[]' Returning cached plugin connector_plugin with class MCollective::Connector::Rabbitmq
W, [2012-11-30T09:38:27.662195 #21197] WARN -- : runner.rb:68:in `run' Failed to handle message: incompatible marshal file format (can't be read)
format version 4.8 required; 89.111 given - TypeError
D, [2012-11-30T09:38:27.662412 #21197] DEBUG -- : rabbitmq.rb:182:in `publish' Sending a broadcast message to RabbitMQ
irb(main):001:0> require 'netcf'
=> true
irb(main):002:0> n = Netcf.new
=> #<Netcf:0x2ab58b74e058>
irb(main):003:0> i = n.lookup_by_name('eth0')
=> #<NetcfIf:0x2ab58b741df8>
irb(main):004:0> puts i.xml_desc
<?xml version="1.0"?>
<interface name="eth0" type="ethernet">
<start mode="onboot"/>