Skip to content

Instantly share code, notes, and snippets.

// Worth noting that restrictions prevented me from accessing libraries like the Apache Commons Guid and others
// Also, not production code - needs some TLC & refactoring love
// If I get time will be moved to a proper home in GitHub
package semeosis.eventsourcing.infrastructure;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@GregMefford
GregMefford / setup-statsd-centos.sh
Last active April 10, 2022 15:31 — forked from collegeman/setup-statsd.sh
Install Graphite and StatsD on CentOS (updated for 6.4 x86_64)
# First do a fresh install of CentOS 5.7 i386, server configuration (no GUI)
# This should be performed as root since it's going to be installing a bunch of stuff
# --- Update things to make sure we have the latest patches ---
# Add EPEL so we can get reasonably recent packages
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# --- Install all the packages --- #
yum -y install python-whisper python-carbon graphite-web python-memcached python-ldap httpd memcached
@entaroadun
entaroadun / visualization_in_js.md
Created December 23, 2011 21:35
Visualization using Javascript on Github

Data visualization in one of three most important steps in data mining (https://github.com/entaroadun/hnpickup#readme). Often times, it's impossible to understand data without proper visualization. I went looking for great tools to do that.

Two website list recent JS visualization frameworks:

Most of them are available on Github. My three favorite:

@jwalton
jwalton / RickshawGraph.md
Last active July 30, 2021 02:35
Rickshaw Graph is a drop in replacement for Dashing's graph

Graphing Widget

The graphing widget shows graphs using the Rickshaw graphing library. The names of data fields should be (vaguely) familiar if you've used Rickshaw before.

It's recommended that you replace the /assets/javascripts/rickshaw.min.js from your dashboard with the latest from here.

Supported HTML data fields

@MetaRecursion
MetaRecursion / ICacheService.cs
Last active December 23, 2015 12:09 — forked from kevinblake/ICacheService.cs
Updated ASP.NET caching sample with thread-safety.
using System;
namespace AppNamespace.Caching
{
interface ICacheService
{
T Get<T>(string cacheKey, Func<T> getItemCallback) where T : class;
T Get<T>(string cacheKey, DateTime absoluteExpiration, TimeSpan slidingExpiration, Func<T> getItemCallback) where T : class;
}
}
@jfromaniello
jfromaniello / bcompare-git.md
Last active April 5, 2024 21:53
Integrate beyond compare 4 with git

Install command line tools:

then run this:

git config --global diff.tool bc3
git config --global difftool.bc3 trustExitCode true
git config --global merge.tool bc3
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@elliottcordo
elliottcordo / emr_spark_thrift_on_yarn
Created December 15, 2014 22:21
EMR spark thrift server
#on cluster
thrift /spark/sbin/start-thriftserver.sh --master yarn-client
#ssh tunnel, direct 10000 to unused 8157
ssh -i ~/caserta-1.pem -N -L 8157:ec2-54-221-27-21.compute-1.amazonaws.com:10000 hadoop@ec2-54-221-27-21.compute-1.amazonaws.com
#see this for JDBC config on client http://blogs.aws.amazon.com/bigdata/post/TxT7CJ0E7CRX88/Using-Amazon-EMR-with-SQL-Workbench-and-other-BI-Tools
@hussfelt
hussfelt / README.md
Last active October 13, 2022 07:03
Dashing widget to display an iframe with specified src

dashing-iframe

IFrame plugin for dashing

Description

Dashing widget to display an iframe with specified src

Installation

Create the folder iframe in the /widgets/ directory. Put the files iframe.coffee, iframe.html and iframe.scss in that folder.

@andershammar
andershammar / install-apache-zeppelin-on-amazon-emr.sh
Last active October 9, 2018 03:31
Bootstrap script for installing Apache Zeppelin on an Amazon EMR Cluster. Verfied on Amazon EMR release 4.x.
#!/bin/bash -ex
if [ "$(cat /mnt/var/lib/info/instance.json | jq -r .isMaster)" == "true" ]; then
# Install Git
sudo yum -y install git
# Install Maven
wget -P /tmp http://apache.mirrors.spacedump.net/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
sudo mkdir /opt/apache-maven
sudo tar -xvzf /tmp/apache-maven-3.3.3-bin.tar.gz -C /opt/apache-maven