Skip to content

Instantly share code, notes, and snippets.

View chrislwade's full-sized avatar

Christopher Wade chrislwade

  • Nashville, TN
  • 00:02 (UTC -05:00)
View GitHub Profile
// ==UserScript==
// @name Fix Kibana Search Box
// @namespace http://tampermonkey.net/
// @version 0.1
// @description See https://github.com/elastic/kibana/issues/7801 for what this fixes.
// @author http://github.com/chrislwade
// @match http://*/app/kibana
// @grant GM_addStyle
// ==/UserScript==
@chrislwade
chrislwade / psych_date_parsing_patch.rb
Created April 26, 2012 19:52
Monkey patch Psych string to date parsing for non-date strings
require 'psych'
# NOTE(chrislwade): See https://github.com/tenderlove/psych/issues/42 for more details.
# Monkey patch to deal with strings that look like dates but aren't really
# dates. The example encountered within our context is product codes in the
# form of ####-##-## which looks like a date on the surface but is really a
# good old string. This patch simply aims to replace the buggy version of
# "date" handling with one that behaves like the new implementation in Psych
# while leaving the remaining functionality of the existing Psych version
@chrislwade
chrislwade / redcar-wrapper.bash
Created March 21, 2011 04:40
This function wraps the Redcar launcher to set different options based on the current directory. I use this to detect when I'm working on Redcar itself or a plugin for Redcar and launching with debug log output redirected to STDOUT. Otherwise I launch
function redcar {
if [ -f plugin.rb ]; then
echo "Found 'plugin.rb'!"
echo "Assuming this directory is a Redcar plugin."
echo "Running with --show-log, --log-level=debug, and without --fork."
wrapped_redcar --show-log --log-level=debug $*
elif [ -f lib/redcar.rb ] && [ -f bin/redcar ]; then
echo "Found 'lib/redcar.rb' and 'bin/redcar'!"
echo "Assuming this is the Redcar application directory."
echo "Running with --show-log, --log-level=debug, and without --fork."