Skip to content

Instantly share code, notes, and snippets.

@wigsy
wigsy / gist:5869295
Created June 26, 2013 17:08
ZSH alias for grep'ing the history command easily
# in your .zshrc add:
alias HG='history | grep '
# reload ZSH (using my default location as an example)
. ~/.zshrc
# Now run: ``HG something_of_interest`` and your history is grepped for said interesting something.
@wigsy
wigsy / ES Mapping Updates
Created January 16, 2013 00:33
Updating ES mappings
* Using the interactions/comment index as an example *
1) Current mappings that do not include collection_id:
curl http://localhost:9200/interactions/comment/_mapping?pretty=true
{
"comment" : {
"properties" : {
"body" : {
"type" : "string"
},
@wigsy
wigsy / test_patterns.rb
Created September 12, 2012 04:29
Test Logstash GROK Filters
require 'rubygems'
require 'grok-pure'
# Set a new matcher
grok = Grok.new
# Load default and custom patterns
grok.add_patterns_from_file("/etc/logstash/patterns/default")
grok.add_patterns_from_file("/etc/logstash/patterns/mycustoms")
@wigsy
wigsy / sayit.sh
Created August 17, 2012 17:01
Fun for the whole family with say in your OSX terminal
#!/bin/bash
for voice in $(say -v ? | awk '{print $1}'); do
say -v $voice "${voice} says - that shit rocks my ass solid yo"
done