- Cluster Quota
oc create clusterquota env-qa \
--project-label-selector environment=qa \
--hard pods=10,services=5
oc create clusterquota user-qa \
#!/bin/bash | |
function jsonval { | |
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop` | |
echo ${temp##*|} | |
} | |
json=`curl -s -X GET http://twitter.com/users/show/$1.json` | |
prop='profile_image_url' | |
picurl=`jsonval` |
# Syslog stuff | |
COMPONENT ([\w._\/%-]+) | |
COMPID postfix\/%{COMPONENT:component}(?:\[%{NUMBER:pid}\])? | |
POSTFIX (?:%{SYSLOGTIMESTAMP:timestamp}|%{TIMESTAMP_ISO8601:timestamp8601}) (?:%{SYSLOGFACILITY} )?%{SYSLOGHOST:logsource} %{COMPID}: | |
# Milter | |
HELO (?:\[%{IP:helo}\]|%{HOST:helo}|%{DATA:helo}) | |
MILTERCONNECT %{QUEUEID:qid}: milter-reject: CONNECT from %{RELAY:relay}: %{GREEDYDATA:milter_reason}; proto=%{WORD:proto} | |
MILTERUNKNOWN %{QUEUEID:qid}: milter-reject: UNKNOWN from %{RELAY:relay}: %{GREEDYDATA:milter_reason}; proto=%{WORD:proto} |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: False | |
tasks: | |
- debug: msg="call handler" | |
changed_when: True | |
notify: do something | |
handlers: |
#! /bin/env python | |
# | |
# USAGE | |
# $ python ad_utils.py "My Group Name" | |
# | |
# Author: | |
# Trinh Nguyen | |
# dangtrinhnt@gmail.com | |
# www.dangtrinh.com |
#!/bin/bash | |
STD_PREFIX="/opt/radio" | |
HERE=$PWD | |
bold(){ | |
echo -e \\033[1m$*\\033[0m | |
} | |
boldn(){ |
#!/bin/bash | |
# | |
# Ansible role test shim. | |
# | |
# Usage: [OPTIONS] ./tests/test.sh | |
# - distro: a supported Docker distro version (default = "centos7") | |
# - playbook: a playbook in the tests directory (default = "test.yml") | |
# - role_dir: the directory where the role exists (default = $PWD) | |
# - cleanup: whether to remove the Docker container (default = true) | |
# - container_id: the --name to set for the container (default = timestamp) |
[mysqld] | |
sql_mode=no_engine_substitution,no_unsigned_subtraction | |
default_tmp_storage_engine=MyISAM | |
sync_relay_log_info=100 | |
relay_log_recovery=1 | |
relay_log_info_repository=FILE | |
innodb_purge_threads=8 | |
innodb_compression_pad_pct_max=37 | |
innodb_compression_failure_threshold_pct=10 | |
innodb_flush_neighbors=0 |
Open $ vim /etc/default/grub
then add elevator=noop
next to GRUB_CMDLINE_LINUX_DEFAULT
. Run $ update-grub
and $ cat /sys/block/sda/queue/scheduler
to be sure that noop is being used:
$ vim /etc/default/grub
$ update-grub
$ cat /sys/block/sda/queue/scheduler
[noop] deadline cfq