I wanted to export my playlists with Plex, I installed Export Tools and ended up with CSV files.
I looked around and couldn't find something to convert those to m3u. I did get a m3u8 file but it didn't work with my devices...
I made a quick python script to convert the csv to m3u...it's possibly useful to someone else...maybe.
options,remainder = getopt.getopt(sys.argv[1:], 'f:r:', ['…
While at LinuxFest Northwest I picked up an Old Raspberry Pi from the Yard Sale. I didn't realise it was a Model A...took me a while to figure out a use for it, not much memory or processing power.
I spent far too long diagnosing why this worked in one set of hosts and not another. When the vrrp_script fails on one host, it's supposed to move the service to the other host, that's the whole point right?
This was working great in one pair of hosts, but not another. Turns out maths are hard and I'm dumb. The weight of the check script is subtracted from the priority. If priorityA - weight is still greater than priorityB, nothing happens. Someone thought it would be cool to change the weight of one of the hosts from 100 to 150. The weight of the test was only 2, so 148 was…
I ran into this problem recently, certificates were verifying ok but were revoked somewhere along the line. I wanted to check against the CRL but it's a somewhat undocumented feature (fixed in openssl 1.0.2). The -crl_check option checks your cert against the CRL listed in the certificate, but only if that is listed and accessible remotely.
To get the crl_check to work, append the CRL to your CA and then specify the -CAfile option to whatever openssl command you are using (I used s_client and verify successfully).
$ cat /etc/puppetlabs/puppet/ssl/ca/ca_crt.pem /…
Augeas is a great tool for changing only parts of a configuration file. It has a few problems though, it's slow and hard to learn and does lack some documentation. That said, unless you can use file_line or inifile, Augeas is the only game in town. The alternative is an exec with sed or awk or something terrible...
To make Augeas…
It came up twice that I had to do this, so I decided to see if I could make something simple that solved my problem. I'm sure there's a project to do this already, but here goes. I have a list of machines, I want to see if they respond to a ping so I can determine if they are up or not.
I wanted to do this two ways, either by feeding in a list from stdin or by giving hostnames as arguments. This took a few revisions to get just right, but here's what I came up with:
# ping many hosts and return up or down for each…
Talk I gave at Puppetcamp Seattle 2015 - June 4, 2015
Slides are here: https://goo.gl/68yr6S
Beginner talk on how to get your code onto your masters.
Copyright 2019 - All Rights Reserved