This is a short step-by-step guide on installing ElasticSearch LogStash and Kibana Stack on a CentOS environment to gather and analyze logs.
rpm -ivh https://dl.dropboxusercontent.com/u/5756075/jdk-7u45-linux-x64.rpm
| # Usage: | |
| # source iterm2.zsh | |
| # iTerm2 window/tab color commands | |
| # Requires iTerm2 >= Build 1.0.0.20110804 | |
| # http://code.google.com/p/iterm2/wiki/ProprietaryEscapeCodes | |
| tab-color() { | |
| echo -ne "\033]6;1;bg;red;brightness;$1\a" | |
| echo -ne "\033]6;1;bg;green;brightness;$2\a" | |
| echo -ne "\033]6;1;bg;blue;brightness;$3\a" |
rsync (Everyone seems to like -z, but it is much slower for me)
| var tmp = null; | |
| $('###selector###').popover({ | |
| trigger: 'manual', | |
| title: 'testing', | |
| delay: {show:500, hide:100} | |
| }); | |
| $('###selector###').hover(function(){ | |
| clearTimeout(tmp); |
| PATCHED_FILENAME = "Monaco for Powerline.ttf" | |
| $(PATCHED_FILENAME): Monaco.ttf fontpatcher.py fontpatcher-symbols.sfd | |
| fontforge -script fontpatcher.py Monaco.ttf | |
| @echo "(´・_・`) You can install the $(PATCHED_FILENAME) now." | |
| Monaco.ttf: Monaco.dfont | |
| fondu Monaco.dfont | |
| rm *.bdf |
| #!/usr/bin/python | |
| import time | |
| def fib(n): | |
| if n < 2: return n | |
| else: return fib(n - 1) + fib(n - 2) | |
| def fast_fib(n, a, b): | |
| if n == 0: return a |
| <?php | |
| namespace Treffynnon; | |
| /** | |
| * A PHP class to access a PHP array via dot notation | |
| * (Agavi http://www.agavi.org was the inspiration). | |
| * | |
| * This was hacked in to an existing codebase hence the | |
| * global config array variable. |
| <?php | |
| /** | |
| * Dot notation for access multidimensional arrays. | |
| * | |
| * $dn = new DotNotation(['bar'=>['baz'=>['foo'=>true]]]); | |
| * | |
| * $value = $dn->get('bar.baz.foo'); // $value == true | |
| * | |
| * $dn->set('bar.baz.foo', false); // ['foo'=>false] | |
| * |