Docker is a new technology, on which, we are building some of our newer distributed systems and services. You may say to yourself, "Another new technology?" and the answer would be yes. I thought the same thing. Why adopt another new thing when we haven't finished flushing out the older thing. The hope is, that with enough buy-in this wouldn't be just the next thing. I want
| #!/bin/bash | |
| set -e | |
| YEARMONTH=$(date +%Y%m) | |
| MONTH=$(date +%b) | |
| TMP_FILE="tmp.log" | |
| DESTINATION_FILE="" | |
| while getopts d:m: opts; do | |
| case ${opts} in |
| <?php | |
| error_reporting(E_ALL); | |
| /* The port for the sensu. */ | |
| $service_port = 3030; | |
| /* Docker binds to localhost on staging */ | |
| $address = "127.0.0.1"; | |
| /* Create a TCP/IP socket. Can also use UDP if speed is a concern*/ |
| #!/bin/bash | |
| # Usage ./whiteboard..sh path/to/picture path/to/new/better/picture | |
| convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2" |
We recently started focusing on telemetry at work. Creating data to help drive
good business decisions. Inasmuch, we are encouraging engineers to start
instrumenting their code to test and utilize our stack. We decided on an
App => Statsite => Graphite => Grafana flow for our metrics.
If you aren't aware, Statsite is a port of StatsD into C but using better and smarter algorithms for computing statistics. Both libraries listen on a port for simple strings to come through, aggregate the data and flush it to Graphite every so often.
Every Sysadmin has gotten the call before...
^ logs full again, the fix didn't work :\
I'm obviously not immune to servers with full disks. So, I log in a run df
sure enough... disk is full. This has happened numerous times on this server.
The daemon running on it produces an obscene amount of logs and the disk only
has 25G. So each time we just log in and delete the logs.
openssl req -new -newkey rsa:2048 -nodes -keyout server-cert.key -out server-cert-sign-req.csr
# Country Name (2 letter code) [AU]:US
# State or Province Name (full name) [Some-State]:California
# Locality Name (eg, city) []:
# Organization Name (eg, company) [Internet Widgits Pty Ltd]:Flutterby Labs, Inc.
# Organizational Unit Name (eg, section) []:
# Common Name (eg, YOUR name) []:www.dogo.co
I hereby claim:
- I am ktilcu on github.
- I am tilman (https://keybase.io/tilman) on keybase.
- I have a public key whose fingerprint is 5C3B 88BD 379C 445D 786A 3C23 BA92 51DB 0C2C 1AF9
To claim this, I am signing this object:
Rules
- no side effects (function can't rely on anything not provided to it)
- inputs and outputs
In Practice
- Nested functions are always an indication of complexity
Creates Functions that are
- Easy to read
- Easy to reuse
| #!/bin/bash | |
| set -o pipefail -o errexit -o noglob -o nounset | |
| function usage() { | |
| cat <<EOUSAGE | |
| Usage: textImageProcessor [OPTIONS] ... | |
| Colorizes and/or optimizes rasterized text. | |
| OPTION DESCRIPTION | |
| ========== ================================================================== |