⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
# Install required Python packages | |
pip install python-keystoneclient sftp-cloudfs ftp-cloudfs py-sendfile pysendfile paramiko python-swiftclient python-daemon python-memcached | |
# Setup sftpcloudfs user | |
useradd -r -s /sbin/nologin -M -c 'sftpcloudfs System User' -d /var/run/sftpcloudfs sftpcloudfs; | |
# Setup some Linux conventions for sftpcloudfs | |
mkdir /etc/sftpcloudfs; | |
mkdir /var/log/sftpcloudfs; | |
mkdir /var/run/sftpcloudfs; |
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/perl -w | |
# mysqltuner.pl - Version 1.3.0 | |
# High Performance MySQL Tuning Script | |
# Copyright (C) 2006-2014 Major Hayden - [email protected] | |
# | |
# For the latest updates, please visit http://mysqltuner.com/ | |
# Git repository available at http://github.com/major/MySQLTuner-perl | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by |
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
python -c "import random; mac = [random.choice(range(256)) for i in range(6)]; mac[0] |= 0x02; mac[0] &= 0xfe; print ':'.join('%02x' % m for m in mac)" |
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 | |
# | |
# Install HAProxy | |
# Script works on Ubuntu 12.04 and 14.04 only | |
set -e | |
set -u | |
set -o pipefail |
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 | |
mysql -e "SELECT table_schema \"Data Base Name\", \ | |
sum( data_length + index_length ) / 1024 / 1024 \"Data Base Size in MB\", \ | |
sum( data_free )/ 1024 / 1024 \"Free Space in MB\" \ | |
FROM information_schema.TABLES GROUP BY table_schema;" |
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 | |
INPUTFILE=${INPUTFILE:-'/etc/resolv.conf'} | |
DEBUG=${DEBUG:-false} | |
FALLBACK_NAMESERVERS_IPV4='8.8.8.8 8.8.4.4' | |
FALLBACK_NAMESERVERS_IPV6='2001:4860:4860::8888 2001:4860:4860::8844' | |
HOST_ADDRESSES_IPV4=$(ip a | awk '/inet / {print $2}' | grep -v '^127\.' | cut -d/ -f1 | paste -d' ' -s) | |
HOST_ADDRESSES_IPV6=$(ip a | awk '/inet6 / {print $2}' | grep -v '^::' | cut -d/ -f1 | paste -d' ' -s) | |
HOST_NAMESERVERS_NOLOCAL_IPV4=$(awk '/^nameserver/ {print $2}' ${INPUTFILE} | grep -v '^127\.\|^::' | grep '\.' | paste -d' ' -s) |
I hereby claim:
- I am mrhillsman on github.
- I am mrhillsman (https://keybase.io/mrhillsman) on keybase.
- I have a public key ASBtfPc_fAPVjIiOg7yxg8NKHSJu1eZd5MBdJOr7bEXDwgo
To claim this, I am signing this object:
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
TASK: [repo_build | Run venv process script] ********************************** | |
failed: [infra01_repo_container-6d540626] => {"changed": true, "cmd": "bash /opt/op-venv-script.sh", "delta": "0:00:45.542975", "end": "2016-11-23 22:23:13.470243", "rc": 99, "start": "2016-11-23 22:22:27.927268", "warnings": []} | |
stderr: | |
function venv_create { | |
VENV_PATH="$1" | |
VENV_FILE="$2" | |
# If the venv working directory already exists remove it | |
[[ -d "/tmp/${VENV_PATH}" ]] && rm -rf "/tmp/${VENV_PATH}" |
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
--- | |
- name: Setup across all nodes | |
remote_user: root | |
hosts: all | |
become: yes | |
vars: | |
packages: | |
- stress-ng |
OlderNewer