Skip to content

Instantly share code, notes, and snippets.

View jhnlsn's full-sized avatar

John jhnlsn

View GitHub Profile
@jhnlsn
jhnlsn / gist:3555766
Created August 31, 2012 16:52
window.onload event binding
<html>
<head>
<script>
window.onload = function() {alert(1)}
window.onload = function() {alert(2)}
window.onload = function() {alert(3)}
function load() {
alert(4);
}
@jhnlsn
jhnlsn / gist:3710988
Created September 13, 2012 00:28
brew install php54 output
Build complete.
Don't forget to run 'make test'.
==> make install
make install
Installing PHP SAPI module: apache2handler
/usr/share/httpd/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1/build-1/libtool' libs/libphp5.so /usr/local/Cellar/php54/5.4.6/libexec/apache2
/usr/share/apr-1/build-1/libtool --mode=install cp libs/libphp5.so /usr/local/Cellar/php54/5.4.6/libexec/apache2/
cp libs/libphp5.so /usr/local/Cellar/php54/5.4.6/libexec/apache2/libphp5.so
Warning! dlname not found in /usr/local/Cellar/php54/5.4.6/libexec/apache2/libphp5.so.
@jhnlsn
jhnlsn / gist:3725078
Created September 14, 2012 21:43
blindparser feedburner
var parser = require('blindparser');
var options = {};
parser.parseURL('http://feeds.feedburner.com/TechCrunch', options,function(err,out){
console.log(err);
console.log(out);
});
/* Output of 2 console.log messages above */
@jhnlsn
jhnlsn / phrase_prefix
Created November 29, 2012 20:27
phrase_prefix query
{
"query": {
"bool": {
"must": [
{
"match": {
"story_title": {
"query": "sull",
"type": "phrase_prefix"
}
config/autorun.sh
configure.ac:43: installing 'config/compile'
configure.ac:40: installing 'config/install-sh'
configure.ac:40: installing 'config/missing'
Makefile.am:29: error: Libtool library used but 'LIBTOOL' is undefined
Makefile.am:29: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
Makefile.am:29: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
Makefile.am:29: If 'LT_INIT' is in 'configure.ac', make sure
Makefile.am:29: its definition is in aclocal's search path.
Makefile.am: installing 'config/depcomp'
@jhnlsn
jhnlsn / gist:5102050
Created March 6, 2013 19:04
couchbase install from node.
npm install
npm http GET https://registry.npmjs.org/couchbase
npm http 304 https://registry.npmjs.org/couchbase
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/request
> [email protected] install /Users/jnelson/wkspace/mysql_vs_couchbase/node_modules/couchbase
> node-gyp rebuild
@jhnlsn
jhnlsn / gist:5102167
Created March 6, 2013 19:17
couchnode install
npm install
npm http GET https://registry.npmjs.org/couchbase
npm http 304 https://registry.npmjs.org/couchbase
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/bindings
> [email protected] install /Users/jnelson/wkspace/mysql_vs_couchbase/node_modules/couchbase
> node-gyp rebuild
package main
import (
"fmt"
"net/http"
"time"
)
func main() {
t0 := time.Now()
@jhnlsn
jhnlsn / functions.sh
Last active August 29, 2015 13:56
/etc/init.d/functions
# -*-Shell-script-*-
#
# functions This file contains functions to be used by most or all
# shell scripts in the /etc/init.d directory.
#
TEXTDOMAIN=initscripts
# Make sure umask is sane
umask 022
@jhnlsn
jhnlsn / gist:9275918
Created February 28, 2014 17:48
A Modified Logstash init.d script when /etc/init.d/functions does not exist
#! /bin/sh
#
# /etc/rc.d/init.d/logstash
#
# Starts Logstash as a daemon
#
# chkconfig: 2345 20 80
# description: Starts Logstash as a daemon
# pidfile: /var/run/logstash-agent.pid