Skip to content

Instantly share code, notes, and snippets.

require 'mixlib/cli'
EXIT_CODES = {
'OK' => 0,
'WARNING' => 1,
'CRITICAL' => 2,
'UNKNOWN' => 3,
}
class Sensu
--- git-up.rb.orig 2011-06-22 00:37:46.000000000 -0400
+++ git-up.rb 2011-06-22 00:37:41.000000000 -0400
@@ -24,18 +24,17 @@
base = merge_base(branch.name, remote.name)
if base == remote.commit.sha
- puts "ahead of upstream".green
+ puts "ahead of upstream".blue
next
end
cookbooks/elasticsearch/recipes/default.rb | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/cookbooks/elasticsearch/recipes/default.rb b/cookbooks/elasticsearch/recipes/default.rb
index ec482af..2212046 100644
--- a/cookbooks/elasticsearch/recipes/default.rb
+++ b/cookbooks/elasticsearch/recipes/default.rb
@@ -146,7 +146,8 @@ template "#{node.elasticsearch.home}/config/elasticsearch.json" do
:refresh_interval =>
node.elasticsearch[:index].engine.robin.refresh_interval
* Manual post-deploy steps
** rake data_bags:update_env_load_balancer_ips
*** knife data bag from file dns data_bags/dns/${ENV}_load_balancers.json
*** reconverge all load_balancer nodes
** rake server_list:update
** On one safe node, safectl util promote-to-master
* Post-deploy sanity check
** http://lb.${ENV}.sa2s.us:8080/stats
** http://monitoring.${ENV}.sa2s.us/
STDOUT: (in /var/www/website/releases/47cc86c5c896c48e0a053fb24b61878561ccfba0)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environmentSTDERR: rake aborted!
uninitialized constant Sonian::Archive::Common
/var/www/website/releases/47cc86c5c896c48e0a053fb24b61878561ccfba0/vendor/rails/activesupport/lib/active_support/dependencies.rb:466:in `load_missing_constant'
/var/www/website/releases/47cc86c5c896c48e0a053fb24b61878561ccfba0/vendor/rails/activesupport/lib/active_support/dependencies.rb:106:in `const_missing'
/var/www/website/releases/47cc86c5c896c48e0a053fb24b61878561ccfba0/config/environments/mindshift.rb:42:in `load_environment'
/var/www/website/releases/47cc86c5c896c48e0a053fb24b61878561ccfba0/config/../vendor/rails/railties/lib/initializer.rb:386:in `load_environment'
/var/www/website/releases/47cc86c5c896c48e0a053fb24b61878561ccfba0/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
holiday:sa-docs.wiki[master] $ git up
Fetching originremote: Counting objects: 25, done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 21 (delta 14), reused 0 (delta 0)
Unpacking objects: 100% (21/21), done.
From github.com:sonian/sa-docs.wiki
b6922ce..a77bcbb master -> origin/master
master up to date
holiday:sa-docs.wiki[master] $ git up
Fetching origin
Usage: check_jmx -U url -O object_name -A attribute [-K compound_key] [-I attribute_info] [-J attribute_info_key] -w warn_limit -c crit_limit [-v[vvv]] [-help]
, where options are:
-help
Prints this page
-U
JMX URL, for example: "service:jmx:rmi:///jndi/rmi://localhost:1616/jmxrmi"
#!/bin/bash
log="$1"
keep="${2:-2}"
if command -v savelog >/dev/null 2>&1; then
savelog -l -c "$keep" "$log"
else
echo "Error: savelog not found. Please check that OS is supported."
echo "Ignoring log_keep, rotating 2 files. Total log size unknown."
for i in $(seq 17); do curl -s -n "http://twitter.com/statuses/user_timeline.xml?count=200&page=$i" | xmlstarlet sel -t -m //status -v id -n; done | grep . | while read id; do curl -s -n -d "" http://twitter.com/statuses/destroy/$id.xml; done
$ fortune -m 'exclamation points'
(computers)
%
Welcome to UNIX! Enjoy your session! Have a great time! Note the
use of exclamation points! They are a very effective method for
demonstrating excitement, and can also spice up an otherwise plain-looking
sentence! However, there are drawbacks! Too much unnecessary exclaiming
can lead to a reduction in the effect that an exclamation point has on
the reader! For example, the sentence