Skip to content

Instantly share code, notes, and snippets.

@spatzle
spatzle / OpennlpServlet.java
Created July 25, 2011 17:52
Opennlp-servlet
package com.example.opennlp;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.util.TreeSet;
import javax.servlet.*;
import javax.servlet.http.*;
mkdir free_monkey
cd free_monkey
git init
git remote add origin git@YOUR_SERVER_HOSTNAME:free_monkey.git
# do some work, git add and commit files
git push origin master:refs/heads/master
mkdir free_monkey
cd free_monkey
git init
git remote add origin git@YOUR_SERVER_HOSTNAME:free_monkey.git
# do some work, git add and commit files
# need the allow empty flag
git commit -a -m "added files" --allow-empty
git push origin master:refs/heads/master
@spatzle
spatzle / install-graphite-ubuntu-11.10.sh
Created October 21, 2011 20:05
Install Graphite 0.9.9 (works on Ubuntu 11.04)
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# Forked from: http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Ubuntu 11.04
# Last tested & updated 10/14/2011
####################################
#sudo apt-get update
#sudo apt-get dist-upgrade
@spatzle
spatzle / install_es.sh
Created October 24, 2011 17:32 — forked from aaronshaf/es.sh
Install ElasticSearch on Ubuntu 11.04
cd ~
sudo apt-get install unzip
sudo apt-get install python-software-properties -y
# before this step make sure /etc/hostname is same as /etc/hosts
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.17.6.tar.gz -O elasticsearch.tar.gz
@spatzle
spatzle / setup-statsd.sh
Created November 2, 2011 20:48 — forked from collegeman/setup-statsd.sh
Turn an Ubuntu 10.04 linode into a StatsD/Graphite server
# install git
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
# download the Node source, compile and install it
#git clone git://github.com/joyent/node.git
wget http://nodejs.org/dist/latest/node-v0.5.10.tar.gz
tar xvfz node-v0.5.10.tar.gz
mv node-v0.5.10 node
cd node
./configure
@spatzle
spatzle / graphite-centos6-install.txt
Created May 31, 2012 22:56 — forked from dillera/graphite-centos6-install.txt
Install Graphite 0.9.9 and Statsd on Centos 6
# FOR CENTOS 6
# Andrew Diller Jan 2012
# Get EPEL Repo installed
rpm --httpproxy proxy --httpport 3128 --import https://fedoraproject.org/static/0608B895.txt
rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm
vi /etc/yum.repos.d/epel.repo
@spatzle
spatzle / README.markdown
Created June 5, 2012 15:21 — forked from lukemorton/README.markdown
init.d file for statsd and carbon on rhel

Customised by Luke Morton

Ideally do this as SUDO

yum install -y git gcc gcc-c++ zlib-devel curl curl-devel openssl

Install node

wget http://nodejs.org/dist/node-v0.4.9.tar.gz
@spatzle
spatzle / metricsd.sh
Last active October 5, 2015 21:28
init.d file for metricsd
#!/bin/sh
#
# for use with https://github.com/mojodna/metricsd
# chkconfig: 2345 95 1
# description: Starts Daemon Using metricsd.jar.
#
# Source function library.
# author: Joyce Chan
. /etc/init.d/functions
@spatzle
spatzle / logstash RPM spec
Created June 6, 2012 16:21 — forked from slojo404/logstash RPM spec
logstash monolithic init script and spec file for CentOS / RedHat
Name: logstash
Version: 1.1.0
Release: 1%{?dist}
Summary: logstash is a tool for managing events and logs
Group: System/Logging
License: ASL 2.0
URL: http://logstash.net/
Source0: http://semicomplete.com/files/logstash/logstash-%{version}-monolithic.jar
Source1: logstash