Skip to content

Instantly share code, notes, and snippets.

Avatar

Charles Newey charlienewey

View GitHub Profile
@willb
willb / backup-db.rb
Created Aug 29, 2012
Backup script for SQLite databases
View backup-db.rb
#!/usr/lib/env ruby
# Acquires a shared lock on a SQLite database file and copies it to a backup
# usage: backup-db.rb DBFILE.db BACKUPFILE.db
# author: William Benton (willb@redhat.com)
# Public domain.
require 'sqlite3'
require 'fileutils'
@mathieue
mathieue / reverse.es
Created Jun 29, 2012
Simple apache read only reverse proxy on elasticsearch
View reverse.es
<VirtualHost *:80>
ServerName es.yourhost.com
<Proxy balancer://main>
BalancerMember http://127.0.0.1:9200 max=1 retry=5
<Limit GET >
order deny,allow
deny from all
allow from 127.0.0.1
You can’t perform that action at this time.