Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
"""
PPDM -> node_exporter textfile collector.
Polls the PPDM REST API once, writes a .prom file into node_exporter's
textfile directory, then exits. Run it on a schedule (cron or a systemd
timer) instead of running it as a long-lived service.
No third-party dependencies -- uses only Python's standard library
(urllib), so nothing needs to be pip installed.
@wasatch-dev
wasatch-dev / fizzbuzz.rb
Created July 13, 2014 19:59
Ruby FizzBuzz with If Statement
def fizzbuzz(n)
if (n % 3 == 0)
puts "Fizz"
end
if (n % 5 == 0)
puts "Buzz"
end
if !((n % 3 == 0) || (n % 5 == 0))
puts n
end
#!/bin/bash
############################################################
# Recursively peruses a directory and converts MKV files
# to MP4 for streaming to Xbox360.
#
# @author: Ticean Bennett
# @url: http://ticean.com
# @see: http://trac.handbrake.fr/wiki/CLIGuide#options
#
# @param file The complete file path.