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
| ~ 0% nc web-012 8649 | xml sel -T -t -m "/GANGLIA_XML/CLUSTER/HOST/METRIC[@TMAX > 0 and @TN > @TMAX]" -s A:T:L "parent::HOST/@NAME" -v "concat(parent::HOST/@NAME,' ',@NAME,' ',@TN,' > ',@TMAX)" -n | |
| web-001.example.com disk_total 2507 > 1200 | |
| web-002.example.com load_one 72 > 70 | |
| web-003.example.com disk_total 1500 > 1200 | |
| web-005.example.com load_one 83 > 70 |
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
| #compdef VBoxManage vbm | |
| # Based on "Oracle VM VirtualBox Command Line Management Interface | |
| # Version 3.2.0" and a close reading of _cvs from the ZSH functions | |
| # directory. Options and arguments are manually specified, which may | |
| # cause drift should VBoxManage change. | |
| # | |
| # 'vbm' is my alias, as typing CamelCase hurts my fingers: | |
| # alias vbm='VBoxManage -q' | |
| # |
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
| 11/11/21 12:08:49 INFO bayes.BayesClassifierDriver: ======================================================= | |
| Confusion Matrix | |
| ------------------------------------------------------- | |
| a b c d e f g h i j k l m n o p q r s t u <--Classified as | |
| 381 0 0 0 0 9 1 0 0 0 1 0 0 2 0 1 0 0 3 0 0 | 398 a = rec.motorcycles | |
| 1 284 0 0 0 0 1 0 6 3 11 0 66 3 0 1 6 0 4 9 0 | 395 b = comp.windows.x | |
| 2 0 339 2 0 3 5 1 0 0 0 0 1 1 12 1 7 0 2 0 0 | 376 c = talk.politics.mideast | |
| 4 0 1 327 0 |
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
| <% | |
| seed = IPAddr.new(ipaddress).to_i | |
| minutes_offset = (seed % 60) * 2 | |
| hour = (minutes_offset / 60) % 24 | |
| minute = minutes_offset % 60 | |
| -%> | |
| <%= minute %> <%= hour %> * * * the-job |
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/zsh | |
| usage () { | |
| echo "usage: ${0:t} [-f known_hosts] host..." | |
| } | |
| KNOWN_HOSTS="$HOME/.ssh/known_hosts" | |
| expanded_hosts() { | |
| case $(uname) in |
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
| file { '/dir': | |
| ensure => directory, | |
| purge => true, | |
| recurse => true, | |
| } |
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/zsh | |
| user="$1" | |
| env="$2" | |
| shift 2 | |
| function usage { | |
| cat <<EOF 2>&1 | |
| usage: app-run.sh user environment command args... | |
| user - the user to run as |
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 zsh | |
| user="$1" | |
| env="$2" | |
| function usage { | |
| cat <<EOF 2>&1 | |
| usage: ru rails_user rails_env command args... | |
| Run command as rails_user with RAILS_ENV=rails_env. |
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/zsh | |
| function usage { | |
| print "$0:r max [min]" 1>&2 | |
| } | |
| max=$1 | |
| min=${2:-1} | |
| if [ -z $max ]; then |
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
| module MyApp | |
| class Application < Rails::Application | |
| # Allows us to read configuration from unconventional places | |
| # (e.g. /etc). | |
| # | |
| # To use: | |
| # config/config_paths.yml: | |
| # development: | |
| # config/blah: config/blah.yml | |
| # |