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
<Plugin exec> | |
Exec "nobody" "/usr/local/bin/collectd_ipt_hashtable.sh" | |
</Plugin> |
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 | |
# this script expects to find each terraform version binary available in the path | |
# with the filename format terraform_0.x.x | |
# | |
# requires jq | |
# doesn't currently support reading states in terraform workspaces | |
function die { | |
echo $1 | |
exit 1 |
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
# Fact: broadcast | |
# | |
# Purpose: | |
# Get broadcast addresses for each interface. | |
# | |
Facter.value('interfaces').split(',').each do |interface| | |
Facter.add("broadcast_" + interface) do | |
setcode do | |
require 'ipaddr' |
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 | |
git ls-files -z | xargs -0 -n1 -I{} -- git log -1 --format="%at {}" {} | perl -ane '($t,$f)=@F;utime($t,$t,$f)' |
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
#!/usr/bin/env python | |
import getpass, re, sys | |
import gnomekeyring | |
all_items = gnomekeyring.list_item_ids_sync("login") | |
for item in all_items: | |
attributes = gnomekeyring.item_get_attributes_sync("login", item) | |
if attributes.has_key("application") == False or attributes["application"] != "chrome-10788085": continue | |
print attributes["action_url"] |
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
@NonCPS | |
List <String> getOnlineNodeNames() { | |
List <String> nodeNames = [] | |
for (node in Jenkins.getInstance().getNodes()) { | |
if (node.getComputer().isOnline()) { | |
nodeNames.add(node.name.toString()) | |
} | |
} | |
return nodeNames |
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
#! /usr/bin/env bash | |
#################################################### | |
# Required Libraries | |
# | |
# library name | commands used | verified version | |
# ------------------------------------------------ | |
# ffmpeg | ffmpeg/ffprobe | 3.1.4 3.2 | |
# gpac | MP4Box | 0.6.1 | |
# mp4v2 | mp4chaps | 2.0.0 |
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
local http = require "http" | |
local nmap = require "nmap" | |
local shortport = require "shortport" | |
local string = require "string" | |
description = [[ | |
Detects if the service is serving an nginx status page | |
]] | |
--- |
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 /proc/stat | grep "cpu " | perl -e 'use List::Util qw(sum); @cols = split /\s+/, <>; shift @cols; $total = sum(@cols); $steal = ($cols[7] / $total) * 100; printf("%0.5f%\n", $steal)' |
NewerOlder