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
<textarea name="my-xml-editor" data-editor="xml" rows="15"></textarea> | |
... | |
<textarea name="my-markdown-editor" data-editor="markdown" rows="15"></textarea> | |
... | |
<script src="//d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js"></script> | |
<script> | |
// Hook up ACE editor to all textareas with data-editor attribute | |
$(function () { |
/* | |
* I add this to html files generated with pandoc. | |
*/ | |
html { | |
font-size: 100%; | |
overflow-y: scroll; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |
function toJSON(node) { | |
let propFix = { for: 'htmlFor', class: 'className' }; | |
let specialGetters = { | |
style: (node) => node.style.cssText, | |
}; | |
let attrDefaultValues = { style: '' }; | |
let obj = { | |
nodeType: node.nodeType, | |
}; | |
if (node.tagName) { |
#!/bin/bash | |
export EC2_HOME=/usr/local/share/ec2_tools/ | |
export JAVA_HOME=/usr/lib/jvm/java | |
export PATH=$PATH:$EC2_HOME/bin | |
INSTANCEID=`curl -s http://169.254.169.254/latest/meta-data/instance-id` | |
case "$1" in | |
MASTER) | |
logger triggering notify master event |
static OSStatus | |
SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams, | |
uint8_t *signature, UInt16 signatureLen) | |
{ | |
OSStatus err; | |
SSLBuffer hashOut, hashCtx, clientRandom, serverRandom; | |
uint8_t hashes[SSL_SHA1_DIGEST_LEN + SSL_MD5_DIGEST_LEN]; | |
SSLBuffer signedHashes; | |
uint8_t *dataToSign; | |
size_t dataToSignLen; |
<script type="text/javascript"> | |
// http://matznermatzner.de/en/bernd/2013/11/loading-non-amd-modules-requirejs-part-1-jquery-ui/ | |
requirejs.config({ | |
paths: { | |
'jquery.ui.core': 'lib/jquery-ui/1.10.4/ui/minified/jquery.ui.core.min', | |
'jquery.ui.mouse': 'lib/jquery-ui/1.10.4/ui/minified/jquery.ui.mouse.min', | |
'jquery.ui.resizable': 'lib/jquery-ui/1.10.4/ui/minified/jquery.ui.resizable.min', | |
'jquery.ui.widget': 'lib/jquery-ui/1.10.4/ui/minified/jquery.ui.widget.min', | |
}, | |
shim: { |
# Because I know I'll forget this when I need it again, I'm documenting it here. | |
screencapture -x -C -T0 cap.png; (pngtopnm cap.png | ppmtopgm | pnmquant 16 | pnmtopng > cap-bw.png) >/dev/null 2>&1 |
<?php | |
/** | |
* Simplified WordPress DB drop-in replacement for persistent database connections | |
* (If https://core.trac.wordpress.org/attachment/ticket/31018/31018-2.diff gets into core) | |
* | |
* Actual working version right now would look like: https://gist.github.com/jtsternberg/eec4ab95e11ce9be4807 | |
* | |
* WordPress Trac Ticket {@link https://core.trac.wordpress.org/ticket/31018} | |
*/ |
<?php | |
global $wpdb; | |
$pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 1; | |
$limit = 5; | |
$offset = ( $pagenum - 1 ) * $limit; | |
$entries = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}posts LIMIT $offset, $limit" ); | |
echo '<div class="wrap">'; | |