Skip to content

Instantly share code, notes, and snippets.

@snormore
snormore / elasticsearch.conf
Created March 23, 2013 01:11
ElasticSearch config
# ElasticSearch Service
description "ElasticSearch"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
@snormore
snormore / elasticsearch-ubuntu-install.sh
Last active December 15, 2015 07:49
Install ElasticSearch on Ubuntu
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
wget https://github.com/elasticsearch/elasticsearch/archive/v0.20.1.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
@snormore
snormore / mongotestcase.py
Created September 29, 2012 02:59
Django, MongoDB, and MongoEngine: A custom TestCase managing test database creation and cleanup between test methods.
#coding: utf-8
from nose.plugins.skip import SkipTest
from mongoengine.python_support import PY3
from mongoengine import connect
try:
from django.test import TestCase
from django.conf import settings
except Exception as err:
@snormore
snormore / mongotestrunner.py
Created September 21, 2012 06:23
Django, MongoDB, and MongoEngine: A custom TestRunner managing mongo test database creation and cleanup.
#coding: utf-8
from django.test.simple import DjangoTestSuiteRunner
from nose.plugins.skip import SkipTest
from mongoengine.python_support import PY3
from mongoengine import connect
try:
from django.test import TestCase
from django.conf import settings