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 MySQLdb | |
## | |
# @author Jay Taylor [@jtaylor] | |
# @date 2010-11-15 | |
# | |
# @description This is a basic database helper script which will setup the connection. | |
# | |
# @requirements The MySQLdb package must be installed, i.e. `sudo easy_install MySQLdb` | |
# |
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
/** | |
* @author Jay Taylor [@jtaylor] | |
* | |
* @date 2011-08-29 | |
* | |
* @description Eventually I'd like to see this (or something even better) | |
* included in the scala.sh library. | |
*/ | |
trait Parsify { |
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 play.{configuration, Logger} | |
import com.mchange.v2.c3p0.ComboPooledDataSource | |
/** | |
* @author Jay Taylor [@jtaylor] | |
* | |
* @date 2012-03-22 | |
* | |
* @description c3po Database connection pool configuration container and applicator. | |
* |
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
/** | |
* Copyright (C) 2009-2011 Typesafe Inc. <http://www.typesafe.com> | |
*/ | |
package akka.routing | |
import akka.actor.{ UntypedActor, Actor, ActorRef, ForwardableChannel } | |
/** | |
* A Dispatcher is a trait whose purpose is to route incoming messages to actors. |
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
## | |
# How about a `free` command if we're on OS-X? | |
# | |
if [ -z "`which free`" ]; then | |
freePython=" | |
import re, subprocess | |
# Get process info | |
ps = subprocess.Popen(['ps', '-caxm', '-orss,comm'], stdout=subprocess.PIPE).communicate()[0] | |
vm = subprocess.Popen(['vm_stat'], stdout=subprocess.PIPE).communicate()[0] | |
# Iterate over all processes |
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
// Found at: http://www.scala-lang.org/node/7873 & https://gist.github.com/621684 | |
/* NSC -- new Scala compiler | |
* Copyright 2005-2010 LAMP/EPFL | |
* @author Paul Phillips | |
*/ | |
package common.utils | |
//package scala.tools.nsc | |
//package util |
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.squeryl.adapters.PostgreSqlAdapter | |
class NewAgePostgreSqlAdapter extends PostgreSqlAdapter { | |
override val usePostgresSequenceNamingScheme: Boolean = true | |
} |
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
# ElasticSearch upstart script | |
description "ElasticSearch service" | |
start on (net-device-up | |
and local-filesystems | |
and runlevel [2345]) | |
stop on runlevel [016] |
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 java.net.URLDecoder | |
import java.util.{ArrayList, HashMap, List, Map} | |
import scala.collection.JavaConversions._ | |
/** | |
* Parse the query string portion of a string containing a URI or URL. | |
*/ | |
/** | |
* Parse the query string portion of a string containing a URI or URL. | |
*/ |
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
##################### ElasticSearch Configuration Example ##################### | |
# This file contains an overview of various configuration settings, | |
# targeted at operations staff. Application developers should | |
# consult the guide at <http://elasticsearch.org/guide>. | |
# | |
# The installation procedure is covered at | |
# <http://elasticsearch.org/guide/reference/setup/installation.html>. | |
# | |
# ElasticSearch comes with reasonable defaults for most settings, |