- Right from the Wolf's mouth ;) – [1] - Apache Flume @ bigconf.io
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Uses the Readability Metrics API from http://ipeirotis.appspot.com/readability-api.html | |
# Accepts text from STDIN (piped) or as an argument | |
=begin examples | |
pbpaste|text_score.rb # copy text and run (on OS X) to get the stats for the clipboard. | |
cat myfile.md|text_score.rb # get scores for the contents of a file | |
=end | |
require 'open-uri' | |
require 'net/http' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
current_section: Currently | |
doing_file: ~/Dropbox/notes/wwid-??.md | |
views: | |
times: | |
date_format: '%a %_I:%M%P' | |
section: All | |
count: 0 | |
wrap_width: 0 | |
template: '%boldblack%date %boldcyan > %boldwhite%title %boldbgwhite%boldblack%interval%default' |
I run irssi inside a tmux session on OSX. I often close the terminal as I usually get notified by growl about important stuff. I don't want to open a terminal and write a command every time I want to check IRC.
#!/bin/zsh
/usr/local/bin/tmux attach -d -t irssi || /usr/local/bin/tmux new -s irssi irssi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# restart-cm-service.sh | |
# Restart a Cloudera-Manager-managed service via the REST API | |
# ----------------------------------------------------------------------- | |
# Copyright (C) 2014 Cloudera and Ben White | |
# Cloudera Manager credentials | |
USERNAME=admin | |
PASSWORD=admin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Adapted from | |
# a) http://blog.cloudera.com/blog/2013/11/approaches-to-backup-and-disaster-recovery-in-hbase/#snapshots | |
# b) https://blog.cloudera.com/blog/2013/03/introduction-to-apache-hbase-snapshots/ | |
# c) https://groups.google.com/forum/#!topic/nosql-databases/osC58F5PDsE | |
# 1. create table | |
hbase shell <<EOF | |
disable 'testTable' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package mapreduce | |
/** | |
* This is an attempt to find a minimal set of type classes that describe the map-reduce programming model | |
* (the underlying model of Google map/reduce, Hadoop, Spark and others) | |
* The idea is to have: | |
* 1) lawful types that fully constrain correctness | |
* 2) a minimal set of laws (i.e. we can't remove any laws, | |
* 3) able to fully express existing map/reduce in terms of these types | |
* |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!