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
mvn install:install-file -DgroupId=org.apache.http -DartifactId=httpcore-nio-4.1 -Dversion=4.1 -Dfile=httpcore-nio-4.1.jar -Dpackaging=jar -DgeneratePom=true | |
mvn install:install-file -DgroupId=org.apache.http -DartifactId=httpcore-4.1 -Dversion=4.1 -Dfile=httpcore-4.1.jar -Dpackaging=jar -DgeneratePom=true | |
mvn install:install-file -DgroupId=org.apache.http -DartifactId=httpclient-4.1 -Dversion=4.1 -Dfile=httpclient-4.1.jar -Dpackaging=jar -DgeneratePom=true | |
mvn install:install-file -DgroupId=org.apache.http -DartifactId=httpclient-cache-4.1 -Dversion=4.1 -Dfile=httpclient-cache-4.1.jar -Dpackaging=jar -DgeneratePom=true | |
mvn install:install-file -DgroupId=org.apache.http -DartifactId=httpmime-4.1 -Dversion=4.1 -Dfile=httpmime-4.1.jar -Dpackaging=jar -DgeneratePom=true | |
mvn install:install-file -DgroupId=org.json.simple -DartifactId=json_simple-1.1 -Dversion=1.1 -Dfile=json_simple-1.1.jar -Dpackaging=jar -DgeneratePom=true | |
mvn install:install-file -DgroupId=org.apache.lucene -DartifactId=lucene-analyzers-comm |
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 | |
if test -s /var/run/hadoop/elephantdb.pid; | |
then | |
OLDPID=`cat /var/run/hadoop/elephantdb.pid` | |
echo "Killing old elephant process, pid=$OLDPID" | |
kill $OLDPID | |
rm /var/run/hadoop/elephantdb.pid | |
fi; | |
nohup java elephantdb.main /elephant/global-conf.clj /usr/local/hadoop/conf/elephantdb-local-conf.clj "`date`" > /var/log/hadoop/elephantdb.log & |
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
package hbase.sandbox; | |
import java.io.IOException; | |
import org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.hbase.HBaseConfiguration; | |
import org.apache.hadoop.hbase.HColumnDescriptor; | |
import org.apache.hadoop.hbase.HTableDescriptor; | |
import org.apache.hadoop.hbase.client.HBaseAdmin; |
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
package controllers | |
import play._ | |
import libs.OpenID | |
import play.mvc._ | |
object Application extends Controller { | |
import views.Application._ |
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
/** | |
* Garrick Evans | |
* 29 Dec 2010 | |
*/ | |
import akka.http._ | |
import akka.actor._ | |
import net.smartam.leeloo.client._ | |
import net.smartam.leeloo.client.request.OAuthClientRequest | |
import net.smartam.leeloo.client.response. {OAuthAuthzResponse, GitHubTokenResponse} |
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._ | |
import java.util.UUID | |
import com.twitter.conversions.time._ | |
import com.twitter.finagle.builder.ClientBuilder | |
import com.twitter.util._ | |
import java.nio.charset.Charset | |
import org.jboss.netty.buffer.{ChannelBuffers, ChannelBuffer} | |
import org.jboss.netty.handler.codec.http._ | |
import com.twitter.finagle.stream.Stream |
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 unfiltered.request._ | |
import unfiltered.response._ | |
// Planify使ってpartial functionでintentの中だけ書く | |
val echo = unfiltered.filter.Planify { | |
case Path(Seg(p :: Nil)) => ResponseString(p) | |
} | |
unfiltered.jetty.Http.anylocal.filter(echo).run() | |
// Planを継承したobjectを作ってintentを定義する |
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
package controllers | |
import play.api._ | |
import play.api.mvc._ | |
import com.novus.salat._ | |
import com.novus.salat.global._ | |
import com.novus.salat.dao._ | |
import 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
object Foo0 extends Controller{ | |
def bar = Json(createAnObject) // Default serialization is used. | |
def bar2 = Json(createAnObject, createAnotherFormats) // default formats are overriden | |
} | |
object Foo1 extends Controller{ |
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
package com.softsimples.social.persistence | |
import scala.collection.JavaConverters._ | |
import com.basho.riak.client.{IRiakClient, RiakFactory} | |
import com.basho.riak.client.bucket.Bucket | |
class DBWrapper(private val riakClient:IRiakClient) { | |
def createHashWrapperFor( bucketName:String ): HashWrapper = { | |
HashWrapper.buildTableWrapper( buildBucket( bucketName ) ) |
OlderNewer