This file contains hidden or 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 | |
### BEGIN INIT INFO | |
# Provides: dns-sync | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: S | |
# Default-Stop: | |
# Short-Description: Synchronizes /etc/resolv.conf in WLS with Windows DNS - Matthias Brooks | |
### END INIT INFO |
This file contains hidden or 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 java.io.*; | |
import java.util.*; | |
/** The class encapsulates an implementation of the Apriori algorithm | |
* to compute frequent itemsets. | |
* | |
* Datasets contains integers (>=0) separated by spaces, one transaction by line, e.g. | |
* 1 2 3 | |
* 0 9 | |
* 1 9 |
This file contains hidden or 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
require 'fileutils' | |
start_time = Time.now | |
SOURCE_DB = { | |
:name => 'db_name', | |
:user => 'db_user', | |
:password => 'db_pass', | |
:host => 'localhost' |
This file contains hidden or 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 bash | |
# This is an RVM Project .rvmrc file, used to automatically load the ruby | |
# development environment upon cd'ing into the directory | |
# https://github.com/wayneeseguin/rvm-site/blob/master/.rvmrc | |
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional. | |
environment_id="ruby-1.8.7@redmine_inst" | |
# |
This file contains hidden or 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
<bean id="eventbusInit" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> | |
<property name="targetObject" value="#{@systemProperties}" /> | |
<property name="targetMethod" value="putAll" /> | |
<property name="arguments"> | |
<util:properties> | |
<prop key="org.bushe.swing.event.swingEventServiceClass">org.bushe.swing.event.ThreadSafeEventService</prop> | |
</util:properties> | |
</property> | |
</bean> |
This file contains hidden or 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
val host = "localhost" | |
val port = 27017 | |
val dbname = "test" | |
val mongodbSciptPath = testResourcesPath / "mongodb" | |
val datagenFile = mongodbSciptPath / "datagen.js" absolutePath | |
val cleanDbFile = mongodbSciptPath / "cleandb.js" absolutePath | |
lazy val dropDb = withArgsTest("please provide a db name", _.length > 0) { | |
args => MongoCli().eval("db.dropDatabase()").host(host).port(port).db(args(0)).cmd | |
} |
This file contains hidden or 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
var cleandb = function() { | |
var cols = db.getCollectionNames(); | |
for (var i = 0; i < cols.length; i++) { | |
db.getCollection(cols[i]).remove({}); | |
} | |
}; | |
cleandb(); |