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
# for juju on xenial | |
cat << EOF > /tmp/a.js | |
db = db.getSiblingDB('juju'); | |
var collectionNames = db.getCollectionNames(), stats = []; | |
collectionNames.forEach(function (n) { stats.push(db[n].stats()); }); | |
stats = stats.sort(function(a, b) { return b['size'] - a['size']; }); | |
for (var c in stats) { print(stats[c]['ns'] + ": " + stats[c]['size'] + " (" + stats[c]['storageSize'] + ")"); } | |
EOF | |
/usr/lib/juju/mongo3.2/bin/mongo --sslAllowInvalidCertificates --ssl -u admin -p $(grep oldpassword /var/lib/juju/agents/machine-0/agent.conf | awk -e '{print $2}') localhost:37017/admin /tmp/a.js |
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
#!/usr/bin/python | |
import os | |
import subprocess | |
import time | |
import yaml | |
import re | |
user_name = os.environ.get("DOCKERHUB_USER") |
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
#!/usr/bin/bash | |
# Download zeromq | |
# Ref http://zeromq.org/intro:get-the-software | |
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz | |
# Unpack tarball package | |
tar xvzf zeromq-4.2.2.tar.gz | |
# Install dependency |
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
#!/usr/bin/bash | |
# Download zeromq | |
# Ref http://zeromq.org/intro:get-the-software | |
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz | |
# Unpack tarball package | |
tar xvzf zeromq-4.2.2.tar.gz | |
# Install dependency |
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
SELECT | |
sip.ip, | |
CASE | |
WHEN sip.alloc_type = 0 THEN 'AUTO' | |
WHEN sip.alloc_type = 1 THEN 'STICKY' | |
WHEN sip.alloc_type = 4 THEN 'USER_RESERVED' | |
WHEN sip.alloc_type = 5 THEN 'DHCP' | |
WHEN sip.alloc_type = 6 THEN 'DISCOVERED' | |
ELSE CAST(sip.alloc_type as CHAR) | |
END "alloc_type", |
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" | |
"os" | |
"github.com/juju/utils" | |
) | |
const MIN_LEN = 30 |
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
#!/usr/bin/env python3 | |
# | |
# Author: Felipe Reyes <[email protected]> | |
# | |
""" | |
Tool for SSH connect to a container using a given container name. | |
Usage:\n\t{0} [username@]container\n" | |
""" |
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
## Workaround openstack nova+openvswitch mtu issues when no jumbo frames are available, | |
## by setting up udev at neutron-gateway to hook on routing interface creation and | |
## lowering the MTU | |
## See: https://blueprints.launchpad.net/neutron/+spec/network-options-mtu | |
## keywords: openstack, nova, openvswitch, mtu, 1500, no jumbo frames | |
## Create these two files: |
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
# | |
# Varnish VCL file for Ghost blogging platform. | |
# http://ghost.org/ | |
# | |
# Written for Ghost v0.3.0. | |
# | |
# This is a low-hanging-fruit type of VCL. TTL of objects are overridden to 2 | |
# minutes, and everything below /ghost/ is pass()-ed so the user sessions | |
# work. | |
# |
NewerOlder