Skip to content

Instantly share code, notes, and snippets.

<something>
</something>
PUT http://vagrant:9200/video_catalogs/video_catalog/48 [status:500, request:0.013s, query:n/a]
> {"video_catalog":{"id":48,"name":"MyES2Catalog","category_id":25,"whitelist":[4],"whitelist_size":1}}
< {"error":"RoutingMissingException[routing is required for [video_catalogs]/[video_catalog]/[48]]","status":500}
[500] {"error":"RoutingMissingException[routing is required for [video_catalogs]/[video_catalog]/[48]]","status":500}
@AaronRustad
AaronRustad / keybase.md
Created April 10, 2014 17:34
keybase.md

Keybase proof

I hereby claim:

  • I am aaronrustad on github.
  • I am aaronrustad (https://keybase.io/aaronrustad) on keybase.
  • I have a public key whose fingerprint is 0305 99D1 3C48 1653 FF48 7F79 B144 FEDE 830F 597D

To claim this, I am signing this object:

@AaronRustad
AaronRustad / prepare-commit-msg
Created November 21, 2012 17:31
.git/hooks/prepare-commit-msg
#!/bin/sh
ORIG_MSG_FILE="$1"
TEMP=`mktemp /tmp/git-XXXXX`
PIVOTAL_NUMBER=`git rev-parse --abbrev-ref HEAD | sed -ne 's/.*_\([0-9]*$\)/\1/p'`
if [ "$PIVOTAL_NUMBER" ]
then
(cat $ORIG_MSG_FILE; echo "[#$PIVOTAL_NUMBER]";) > "$TEMP"
cat "$TEMP" > "$ORIG_MSG_FILE"
fi
## NEW USER PAGE
<%= form_for @user %>
...
<%= f.text_field :username, :class => 'txt_input', :focus => true %>
...
<% end %>
## APPLICATION.JS
$(document).ready(function() {
$('input[focus=true]').focus();
<%= javascript_tag do %>
function setFocus(id) {
$('#' + id).focus();
};
<% end %>
<%= form_for @user %>
...
<%= f.text_field :username, :class => 'txt_input', :onClick => "setFocus('user_username');" %>
...
shell /bin/bash
#term xterm-256color
term xterm
# terminfo and termcap for nice 256 color terminal
# # allow bold colors - necessary for some reason
attrcolor b ".I"
# # tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
defbce "on"