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
Uppercase | |
gUw - upper word | |
gUU - upper line | |
guw - lower word | |
guu - lower line | |
gU3w - upper 3 words | |
GREAT | |
ga/g8 - display hex/utf8 | |
ggg?G - rot13 | |
gd - go to var local definition |
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
require 'socket' | |
require 'pp' | |
require 'xdr' | |
# Inspiration | |
# https://github.com/fastly/ganglia/blob/master/lib/gm_protocol.x | |
# https://github.com/igrigorik/gmetric/blob/master/lib/gmetric.rb | |
# https://github.com/ganglia/monitor-core/blob/master/gmond/gmond.c#L1211 | |
# https://github.com/ganglia/ganglia_contrib/blob/master/gmetric-python/gmetric.py#L107 |
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
################################## | |
### Custom additions from Krux | |
################################## | |
### Extensive documentation here: | |
### http://vagrantup.com/docs/vagrantfile.html | |
require 'etc' | |
owner = ENV['KRUX_MY_USERNAME'] || Etc.getlogin | |
hosts = { |
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
require 'strscan' | |
require 'forwardable' | |
# Stupid JSON parser. Only handles well-formed JSON. | |
# Otherwise, it may go into an endless loop. | |
class Parser | |
WSP = /\s+/ | |
OBJ = /[{\[]/ | |
NUM = /-?\d+(\.\d+)?([eE][+-]?\d+)?/ | |
BOL = /(?:true|false)\b/ |
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
ec2-create() { | |
echo "Creating ${1}${2}: $6" | |
ec2-run-instances --region ${1} -z ${1}${2} -g ${3} -k ${4} -t ${5} ${6} \ | |
| tee -a $CREATED \ | |
| gawk '{print strftime("%Y-%m-%d %H:%M:%S :", systime()), $0 }' >> $LOG | |
# echo "Sleeping...." | |
# sleep 45 | |
} |
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
load "server.rb" | |
default_run_options[:pty] = true | |
desc "Install Git, Ruby" | |
task :prereq do | |
run "sudo yum install -y git ruby ", :pty => true | |
end |
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
$ cat facter.log | |
** [out :: ec2-107-22-149-65.compute-1.amazonaws.com] Amazon Linux AMI release 2011.09 | |
** [out :: ec2-107-22-149-65.compute-1.amazonaws.com] operatingsystem => Amazon | |
** [out :: ec2-107-22-149-65.compute-1.amazonaws.com] operatingsystemrelease => 2.6.35.14-97.44.amzn1.x86_64 | |
** [out :: ec2-174-129-92-129.compute-1.amazonaws.com] Amazon Linux AMI release 1 (beta) | |
** [out :: ec2-174-129-92-129.compute-1.amazonaws.com] operatingsystem => Amazon | |
** [out :: ec2-174-129-92-129.compute-1.amazonaws.com] operatingsystemrelease => 2.6.34.6-54.24.amzn1.x86_64 | |
** [out :: ec2-184-72-202-223.compute-1.amazonaws.com] Amazon Linux AMI release 1 (beta) | |
** [out :: ec2-184-72-202-223.compute-1.amazonaws.com] operatingsystem => Amazon | |
** [out :: ec2-184-72-202-223.compute-1.amazonaws.com] operatingsystemrelease => 2.6.34.7-56.40.amzn1.x86_64 |
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 | |
(/usr/local/bin/db2log | \ | |
mk-query-digest --fingerprints \ | |
--filter '$event->{user} !~ m/^(bi|memonic)$/') 2>&1 | \ | |
mail -s "MySQL slow logs" root | |
# Rotate slow logs. Will move them into the backup table slow_log_backup. If | |
# that table exists it's overwritten with the primary slow log. | |
# So with this strategy we can still access yesterday's slow log by querying | |
# slow_log_backup. |
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
A good commit message looks like this: | |
Header line: explaining the commit in one line | |
Body of commit message is a few lines of text, explaining things | |
in more detail, possibly giving some background about the issue | |
being fixed, etc etc. | |
The body of the commit message can be several paragraphs, and | |
please do proper word-wrap and keep columns shorter than about |
OlderNewer