$ openssl s_client -connect server:636 -showcerts
$ ldapsearch -x -H "ldaps://server:636" -D 'uid=$UUID,dc=example,dc=com' -W
# /etc/logrotate.d/scalr | |
/var/log/scalr/*.log { | |
daily | |
missingok | |
notifempty | |
rotate 7 | |
compress | |
} |
require 'nokogiri' | |
require 'active_support/core_ext/hash' #from_xml | |
valid_xml_str = Nokogiri::XML(str) { |config| config.strict }.to_s | |
hash = Hash.from_xml(valid_xml_str) |
index: | |
analysis: | |
analyzer: | |
default: | |
type: custom | |
tokenizer: whitespace | |
filter: [standard, asciifolding, lowercase] |
$ openssl s_client -connect server:636 -showcerts
$ ldapsearch -x -H "ldaps://server:636" -D 'uid=$UUID,dc=example,dc=com' -W
require "rubygems" | |
require "crack" | |
require "json" | |
require "base64" | |
myXML = Crack::XML.parse(File.read(ARGV[0])) | |
def decode_base64(parent, myHash) | |
myHash.each {|key, value| | |
if value.is_a?(Hash) | |
decode_base64(key, value) |
PLUGIN_NAME = 'Composer becomes Album Artist' | |
PLUGIN_AUTHOR = 'Romain Philibert' | |
PLUGIN_DESCRIPTION = '''Set composer value to album artist.''' | |
PLUGIN_VERSION = "0.1" | |
PLUGIN_API_VERSIONS = ["0.15"] | |
from picard.metadata import register_album_metadata_processor | |
import re | |
import eyed3 | |
import os | |
import glob; | |
for filename in glob.glob('/dir/to/mp3/**/**/*.mp3'): | |
try: | |
print(filename) | |
audiofile = eyed3.load(filename) | |
audiofile.tag.setTextFrame('TCOM', audiofile.tag.album_artist or audiofile.tag.artist) |
#!/bin/sh | |
PORT=$1 | |
tcpdump -i lo -A -s 10240 "tcp port $PORT and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)" | egrep --line-buffered "^........(GET |HTTP\/|POST |HEAD )|^[A-Za-z0-9-]+: " | sed -r 's/^........(GET |HTTP\/|POST |HEAD )/\n\1/g' |
List facts from one server | |
$ mco inventory server1.example.com | |
Then list values for one fact for all servers | |
$ mco rpc rpcutil get_fact fact=memoryfree |