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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
| <head> | |
| <title>{Title}{block:PostTitle} - {PostTitle}{/block:PostTitle}</title> | |
| <link rel="icon" href="{Favicon}"/> | |
| <link rel="alternate" type="application/rss+xml" title="RSS" href="{RSS}"/> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
| <meta name="viewport" content="width=775"/> | |
| <!-- DEFAULT COLORS --> |
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
| // ==UserScript== | |
| // @id prestigeSampleDownloader | |
| // @name prestigeSampleDownloader | |
| // @include http://www.prestige-av.com/* | |
| // @author phorbidden | |
| // @version 1.00 | |
| // ==/UserScript== | |
| (function() { |
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
| package com.twitter.finagle.example.http | |
| import java.net.InetSocketAddress | |
| import com.twitter.finagle.{Service, SimpleFilter} | |
| import com.twitter.util.Future | |
| import com.twitter.finagle.http.path._ | |
| import com.twitter.finagle.builder.{Server, ServerBuilder} | |
| import com.twitter.finagle.http._ | |
| import com.twitter.finagle.builder.ClientBuilder |
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
| resolvers += "twitter-repo" at "http://maven.twttr.com" | |
| libraryDependencies ++= Seq( | |
| "com.twitter" % "finagle-core_2.9.1" % "4.0.2", | |
| "com.twitter" % "finagle-http_2.9.1" % "4.0.2", | |
| "com.twitter" % "finagle-stream_2.9.1" % "4.0.2" | |
| ) |
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
| package jp.ddo.loveless | |
| import com.mongodb.casbah.Imports._ | |
| import net.liftweb.json._ | |
| object CasbahSample extends App { | |
| val collection = MongoConnection("servername")("tumblr")("reblogdata") | |
| val condition = MongoDBObject("count"->221) | |
| case class Data(rk:String, count:Int) |
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
| class Respond extends Service[Request, Response] { | |
| def apply(request: Request) = { | |
| object KI extends IntParamMatcher("k") | |
| object K extends ParamMatcher("k") | |
| val text = (Path(request.path) :? request.params) match { | |
| case Root / "name" / name :? KI(k) => | |
| "Hello, %s i %s!".format(name, k) | |
| case Root / "name" / name :? K(k) => | |
| "Hello, %s %s!".format(name, k) |
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
| package org.example | |
| import java.io.File | |
| import java.util.concurrent.TimeUnit | |
| import java.net.InetSocketAddress | |
| import com.twitter.finagle.{Service, SimpleFilter} | |
| import com.twitter.util.{Future, Duration} | |
| import com.twitter.finagle.http.path._ | |
| import com.twitter.finagle.builder.{Server, ServerBuilder} | |
| import com.twitter.finagle.http._ |
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
| List(Random.nextInt(size), Random.nextInt(size), Random.nextInt(size)) | |
| // はもうちょっとかっこよくかける気がする。 |
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 addUmm: String => String = _ + " umm" | |
| val addAhem: String => String = _ + " ahem" | |
| val ummThenAhem = addAhem.compose(addUmm) | |
| def addUmm2(x: String) = x + " umm" | |
| def addAhem2(x: String) = x + " ahem" | |
| val ummThenAhem2 = (addAhem2 _).compose(addUmm2 _) |
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 com.twitter.sbt._ | |
| organization := "com.example" | |
| name := "Finagle Http Project" | |
| version := "0.1.0" | |
| scalaVersion := "2.9.2" |
OlderNewer