This file contains 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
filetype plugin on | |
filetype indent on | |
syntax enable | |
colorscheme desert | |
set background=dark | |
set expandtab | |
set smarttab | |
set shiftwidth=2 | |
set tabstop=2 |
This file contains 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 ruby | |
require 'openssl' | |
require 'socket' | |
require 'timeout' | |
DEFAULT_PORT=443 | |
CONNECT_TIMEOUT=5 | |
targets = ARGV.empty? ? ARGF : ARGV |
This file contains 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
$ aws opsworks describe-stacks | |
{ | |
"Stacks": [ | |
{ | |
"ServiceRoleArn": "arn:aws:iam::047170177871:role/aws-opsworks-service-role", | |
"StackId": "575e1389-1df3-427d-99d3-d60f89a41442", | |
"DefaultRootDeviceType": "ebs", | |
"Name": "rhenning_test", | |
"ConfigurationManager": { | |
"Version": "11.4", |
This file contains 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 ruby | |
## run like: tail --lines=0 --follow=name /var/log/tomcat6/gc.log | this_ruby_script | |
ARGF.each do |line| | |
if match = /secs\]\s\d+K-\>(\d+)K\((\d+)K\)/.match(line) | |
heap_cur = match[1] | |
heap_lim = match[2] | |
heap_pct = heap_cur.to_f / heap_lim.to_f * 100.0 | |
puts "#{heap_cur} / #{heap_lim} KiB : #{heap_pct}%" |
This file contains 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
BATCH_LIMIT = 500 | |
processed_event_count = 0 | |
logger = Logger.new(STDOUT) | |
total_event_count = SearchIndexEvent.count | |
## had to get a little closer to the DB here due to a bug in Mongoid2 | |
## that manifests when disabling cursor timeouts | |
SearchIndexEvent.collection.driver.find({}, :timeout => false) do |cursor| |
This file contains 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
rhenning@apprhenning:~/git/Provisioning/chef/cookbooks/neat-mongodb$ bundle exec berks upload --halt-on-frozen | |
Using neat-mongodb (0.1.0) from metadata | |
Using mongodb (0.13.7) | |
Using build-essential (1.4.2) | |
Using chef-sugar (1.0.1) | |
Using ebs (0.4.5) | |
Using xfsprogs (0.0.1) | |
Using aws (1.8.5) | |
Using neat_libraries (0.3.3) | |
Using chef-solo-search (0.5.1) |
This file contains 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
{ | |
"theme": "Soda Dark.sublime-theme", | |
"font_size": 11.0, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"tab_completion": true, | |
"detect_indentation": false, | |
"ignored_packages": [ "Vintage" ], | |
"sublimelinter_executable_map": { "ruby": "/Users/rhenning/.rvm/bin/rvm-auto-ruby" }, | |
"sublimelinter_syntax_map": { "ruby": "/Users/rhenning/.rvm/bin/rvm-auto-ruby" } |
This file contains 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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCb1Rl3cfJNrppD1JH+ItXN5Hq/IBv6SNTEk1k1Gd8/j4nm05wPtpMDxnwYgt+g8VgVvwRc9v4Ff9I7O+jTU8OOJEGR0wMqb9URhaSbJhQ+hpElg7iWGPudxDGUR9ivyMEII7IlJCFPK2BqxRxdGoZ2IMgSfmntrRo9fTreO7g6maKV1DRgZtO8eSdPc6fPybuVyPMSt3VwPJIkHFXO7dezRrvFheei8MYdscsJxlXBgdGYYbfk2KBR2eCJzmYxLXXnirIriKXtAy4YYNOM/YBxfIwkdcq1RAgo5IdcN32TEoMxbt2+ykYnJBzECJn6A4of1eh27YAklHQzNl0KnwRf [email protected] |
This file contains 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
# Hack of robbyrussell's theme, with RVM & Git indicators, but no host indicator | |
# Example: | |
# ✻ currentdir rvm:rubyversion@gemset git:branchname ✗ | |
# Get the current ruby version in use with RVM: | |
if [ -e ~/.rvm/bin/rvm-prompt ]; then | |
RUBY_PROMPT_="%{$fg_bold[blue]%}rvm:%{$fg[cyan]%}\$(~/.rvm/bin/rvm-prompt s i v g)%{$fg_bold[blue]%}%{$reset_color%} " | |
else | |
if which rbenv &> /dev/null; then | |
RUBY_PROMPT_="%{$fg_bold[blue]%}rbenv:%{$fg[cyan]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg_bold[blue]%}%{$reset_color%} " |
NewerOlder