Skip to content

Instantly share code, notes, and snippets.

View davidcoallier's full-sized avatar

David Coallier davidcoallier

View GitHub Profile
require 'formula'
class FlumeNg < Formula
homepage 'https://github.com/apache/flume'
url 'http://archive.cloudera.com/cdh4/cdh/4/flume-ng-1.4.0-cdh4.6.0.tar.gz'
#sha1 '2217316f274ff615e9e7dc50f411d95edda60cc3'
version "1.4.0-cdh4.6.0"
def flume_ng_script
<<-EOS.undent
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.0.deb
sudo dpkg -i elasticsearch-1.1.0.deb
{
"title": "Operations Logs",
"rows": [
{
"title": "Options",
"height": "50px",
"editable": true,
"collapse": false,
"collapsable": true,
"panels": [
topojson = (function() {
function merge(topology, arcs) {
var arcsByEnd = {},
fragmentByStart = {},
fragmentByEnd = {};
arcs.forEach(function(i) {
var e = ends(i);
(arcsByEnd[e[0]] || (arcsByEnd[e[0]] = [])).push(i);
@davidcoallier
davidcoallier / twitter-rsa.r
Last active August 29, 2015 14:19
RSA Conference Twitter Term Cloud
library("twitteR")
library("wordcloud")
library("tm")
# You running Windows? It's RSA... you probably are so this is for you.
# download.file(url="http://curl.haxx.se/ca/cacert.pem", destfile="cacert.pem")
# Go to https://dev.twitter.com/apps and get your keys from your register app there.
consumer_key <- 'YOUR CONSUMER KEY'
consumer_secret <- 'YOUR SECRET CONSUMER KEY'
Index: php_spl.c
===================================================================
--- php_spl.c (revision 290576)
+++ php_spl.c (working copy)
@@ -359,6 +359,97 @@
}
}
+
+/* {{{ spl_strrpos_ascii: borrowed from the php ext/standard/string.c */
// ==UserScript==
// @name Assembla Changeset Navigator
// @namespace echolibre
// @description In assembla, navigate to previous and next changeset
// @include https://code.assembla.com/*
// @date 2009-03-02
// @version 1.0
// ==/UserScript==
var GM_JQ = document.createElement('script');
%% Map Function
%%
%% This map function will output the doc.name as the key
%% and the doc.value as the value of that key.
%%
%% In javascript the code would look like:
%%
%% function(doc) {
%% if (doc.name && doc.value) {
%% emit(doc.name, doc.value);
function(doc) {
if (doc.name && doc.value) {
emit(doc.name, doc.value);
}
}
%% Map Function
%% Thanks to Adam Kocoloski (@kocolosk) for this compacted version
fun({Doc}) ->
case {proplists:get_value(<<"name">>, Doc), proplists:get_value(<<"value">>, Doc)} of
{undefined, _} ->
ok;
{_, undefined} ->
ok;
{Name, Value} ->
Emit(Name, Value);