Skip to content

Instantly share code, notes, and snippets.

@troszok
troszok / logstash_cleanup_es.rb
Created July 18, 2013 08:47
Cleanup logstash elasticsearch indexes
aliases = Tire::Configuration.client.get("#{Tire::Configuration.url}/_aliases")
JSON.parse(aliases.body).keys.select{|v| v =~ /^logstash/i }.each do |n|
Tire::Index.new(n).delete
end
@troszok
troszok / gist:2983706
Created June 24, 2012 15:35
gitlab_nginx.conf
upstream gitlab {
server unix:/home/gitlab/gitlab/tmp/sockets/gitlab.socket;
}
server {
listen YOUR_SERVER_IP:80;
server_name gitlab.YOUR_DOMAIN.com;
root /home/gitlab/gitlab/public;
# individual nginx logs for this gitlab vhost
#! /bin/bash
### BEGIN INIT INFO
# Provides: gitlab
# Required-Start: $local_fs $remote_fs $network $syslog redis-server
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: GitLab git repository management
# Description: GitLab git repository management
### END INIT INFO
##
# Calendar helper with proper events
# http://www.cuppadev.co.uk/webdev/making-a-real-calendar-in-rails/
#
# (C) 2009 James S Urquhart (jamesu at gmail dot com)
# Derived from calendar_helper
# (C) Jeremy Voorhis, Geoffrey Grosenbach, Jarkko Laine, Tom Armitage, Bryan Larsen
# Licensed under MIT. http://www.opensource.org/licenses/mit-license.php
##