This file contains 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
/containers | |
/containers/0 | |
/containers/0/create_index : | |
/containers/0/health_state : | |
/containers/0/host_uuid : da4aa4b0-ee2f-4ad3-8ded-b09917821cfa | |
/containers/0/hostname : dockermachine | |
/containers/0/ips | |
/containers/0/ips/0 : 10.42.176.231 | |
/containers/0/labels | |
/containers/0/name : Network Agent |
This file contains 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
package main | |
import ( | |
"fmt" | |
"github.com/pkg/errors" | |
"github.com/rancher/go-rancher-metadata/metadata" | |
) | |
func main() { |
This file contains 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
# from http://superuser.com/a/589532 | |
Jenkins.instance.getItemByFullName('jobName').builds.findAll { it.number > 1 && it.number < 100 }.each { it.delete() } |
This file contains 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
# using an image with NetworkManager disabled from starting | |
INFO global: Vagrant version: 1.8.1 | |
INFO global: Ruby version: 2.2.3 | |
INFO global: RubyGems version: 2.4.5.1 | |
INFO global: VAGRANT_VAGRANTFILE="/home/ubuntu/project/Vagrantfile.rhel-project" | |
INFO global: VAGRANT_LOG="debug" | |
INFO global: VAGRANT_OLD_ENV_HOME="/home/ubuntu" | |
INFO global: VAGRANT_OLD_ENV_XDG_SESSION_ID="78" | |
INFO global: VAGRANT_OLD_ENV_PWD="/home/ubuntu/project" | |
INFO global: VAGRANT_OLD_ENV_GOPATH="/home/ubuntu/Projects/go" |
This file contains 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
# Usage: npm install plist-json && node readinglist2json.js | |
var plist = require('plist-json'); | |
plist.parse(process.env.HOME + '/Library/Safari/Bookmarks.plist', function(err, json) { | |
if (err) { | |
console.log(err); | |
return; | |
} | |
for (i=0; i<json.Children.length; i++) { |
This file contains 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 -e | |
if [ -z "$1" ]; then | |
echo "usage: unsource.sh vars.env" | |
elif [ ! -f "$1" ]; then | |
echo "No such file: ${1}" | |
else | |
__start_env=$(mktemp -t unsource.XXXXXX) | |
__end_env=$(mktemp -t unsource.XXXXXX) |
This file contains 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 | |
# requirements: | |
# brew install gawk gsed | |
# settings file ~/.registry_settings | |
# REGISTRY="registry.acme.com" | |
# URL="https://${REGISTRY}:5000/v1" | |
# USERNAME="admin" | |
# PASSWORD="password" |
This file contains 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
# Requires automysqlbackup and stdlib module to be a child | |
# directory of the CWD | |
require "puppet" | |
require "json" | |
def run | |
manifest_path = './manifests/site.pp' | |
module_paths = ['../','./'] | |
config_dir = nil | |
hiera_config = nil |
This file contains 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 | |
[ -z $1 ] && { echo "usage: $0 [iface] [interval: default 1]"; exit 1; } | |
IFACE=$1 | |
INTERVAL=${2:-1} | |
loop=1 | |
PPS_RX=/sys/class/net/${IFACE}/statistics/rx_packets | |
PPS_TX=/sys/class/net/${IFACE}/statistics/tx_packets |
This file contains 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
# File: Vagrantfile | |
# Vagrant.configure(2) do |config| | |
# config.vm.box = "ubuntu/trusty64" | |
# end | |
# | |
# Process: | |
# $ wget https://gist.githubusercontent.com/nextrevision/f81cc9493af565613e6a/raw/e48f4229743f1f29e82fb17d7129c8dead3c51f0/replay_and_test.py | |
# $ vagrant up | |
# $ vagrant ssh | |
# $ sudo apt-get update |
NewerOlder