This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# dhclient change hostname script for Ubuntu | |
# /etc/dhcp/dhclient-exit-hooks.d/sethostname | |
# logs in /var/log/upstart/network-interface-eth0.log | |
# for debugging: | |
echo "sethostname BEGIN" | |
export | |
set -x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.lucene.analysis.Analyzer; | |
import org.apache.lucene.analysis.standard.StandardAnalyzer; | |
import org.apache.lucene.document.*; | |
import org.apache.lucene.index.*; | |
import org.apache.lucene.queryparser.flexible.core.QueryNodeException; | |
import org.apache.lucene.queryparser.flexible.standard.StandardQueryParser; | |
import org.apache.lucene.search.IndexSearcher; | |
import org.apache.lucene.search.Query; | |
import org.apache.lucene.search.ScoreDoc; | |
import org.apache.lucene.search.TopScoreDocCollector; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- acng.conf.orig 2013-05-23 21:20:04.000000000 +0100 | |
+++ acng.conf 2013-05-28 15:02:23.000000000 +0100 | |
@@ -100,6 +100,7 @@ | |
# | |
#VfilePattern = (^|.*?/)(Index|Packages\.bz2|Packages\.gz|Packages|Release|Release\.gpg|Sources\.bz2|Sources\.gz|Sources|release|index\.db-.*\.gz|Contents-[^/]*\.gz|pkglist[^/]*\.bz2|rclist[^/]*\.bz2|/meta-release[^/]*|Translation[^/]*\.bz2)$ | |
#PfilePattern = .*(\.deb|\.rpm|\.dsc|\.tar\.gz\.gpg|\.tar\.gz|\.diff\.gz|\.diff\.bz2|\.jigdo|\.template|changelog|copyright|\.udeb|\.diff/.*\.gz|vmlinuz|initrd\.gz|(Devel)?ReleaseAnnouncement(\\?.*)?)$ | |
+PfilePattern = .*(\.deb|\.rpm|\.dsc|\.tar\.gz\.gpg|\.tar\.gz|\.tgz|\.zip|\.diff\.gz|\.diff\.bz2|\.jigdo|\.bin(\?AuthParam=.*)?|\.template|changelog|copyright|\.udeb|\.diff/.*\.gz|vmlinuz|initrd\.gz|(Devel)?ReleaseAnnouncement(\\?.*)?)$ | |
# Whitelist for expiration, file types not to be removed even when being | |
# unreferenced. Default: same as VfilePattern which is a safe bed. When and | |
# only when the only used mirrors are official repositories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VM=$1 | |
size=`sudo lvs -o lv_size --unit=b --noheadings /dev/vg_vms/ubuntu-base-vm | sed 's/^ *//'` | |
echo size=$size | |
sudo lvcreate --size=$size --name=vms-$VM vg_vms | |
sudo virt-resize --expand sda1 \ | |
/dev/vg_vms/ubuntu-base-vm /dev/vg_vms/vms-$VM | |
mkdir -p tmp | |
virsh dumpxml ubuntu-base-vm > tmp/ubuntu-base-vm.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# s3-download.py - a quick-and-dirty download script to download from S3 | |
# implemented using Boto, which automatically applies AWS IAM role credentials | |
# | |
# This code is distributed under the MIT license from | |
# http://opensource.org/licenses/MIT: | |
# | |
# Copyright (c) 2013 Martijn Koster | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost jenkins.mydomain.com:443> | |
... | |
RewriteEngine On | |
RewriteRule ^/$ /jenkins/ [R] | |
ProxyRequests Off | |
ProxyPreserveHost on | |
ProxyPass /jenkins/ http://localhost:8080/jenkins/ | |
<Location /jenkins/> | |
ProxyPassReverse / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Simple SolrJ with basic auth example | |
* | |
* wget http://apache.mirrors.timporter.net//lucene/solr/3.4.0/apache-solr-3.4.0.tgz | |
* tar xvzf apache-solr-3.4.0.tgz | |
* | |
* CLASSPATH=apache-solr-3.4.0/dist/apache-solr-solrj-3.4.0.jar:apache-solr-3.4.0/dist/solrj-lib/commons-codec-1.4.jar:apache-solr-3.4.0/dist/solrj-lib/commons-httpclient-3.1.jar:apache-solr-3.4.0/dist/solrj-lib/commons-io-1.4.jar:apache-solr-3.4.0/dist/solrj-lib/jcl-over-slf4j-1.6.1.jar:apache-solr-3.4.0/dist/solrj-lib/slf4j-api-1.6.1.jar:. | |
* | |
* javac -cp $CLASSPATH solrj.java | |
* java -cp $CLASSPATH solrj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# A simple Rsolr 1.0.3 example for basic auth | |
# | |
# rvm gemset create rsolr-example | |
# rvm use rsolr-example | |
# gem install rsolr | |
require 'rsolr' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/home/mqtester/.rvm/wrappers/ruby-1.9.2-p290@mqtester/ruby | |
# encoding: utf-8 | |
require "rubygems" | |
require "amqp" | |
@exchange_name = "amq.rabbitmq.trace" | |
class Consumer | |
def handle_message(metadata, payload) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a knife ec2 server create template for Ubuntu 11.4. | |
# It is based on the 10.4 version in the 0.10.2 Chef distribution available here: | |
# https://github.com/opscode/chef/blob/master/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb | |
# with modifications to: | |
# - use the natty APT repository | |
# - install Chef 0.10.2 | |
# - avoid starting the /etc/init.d/chef-client service until the client.rb has been written | |
# - allow a CHEF_NODE_NAME_PREFIX environment variable to prefix to the node name | |
bash -c ' |