Skip to content

Instantly share code, notes, and snippets.

View letusfly85's full-sized avatar
🎯
Focusing

Shunsuke Wada letusfly85

🎯
Focusing
View GitHub Profile
/*
implicit parameterを参照するには、コンパニオンオブジェクト内の定義を探す場合も、その定義位置より後でないとダメみたい。
以下のコードだと
error: could not find implicit value for evidence parameter of type RichGraphics.Drawer[MyLine]
g.draw(MyLine(10, 30, 50, 20))
というエラーになる。
new Frame { ... } の部分をコードの一番最後に移動すると、
うまく動くようになる。
*/
@seratch
seratch / build.sbt
Created December 1, 2011 06:07
Scala School - Testing with specs2 examples
organization := "net.seratch"
name := "sandbox"
version := "0.1"
scalaVersion := "2.9.1"
libraryDependencies ++= Seq(
"junit" % "junit" % "4.9" withSources(),
@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@iwanbk
iwanbk / gist:2295233
Created April 3, 2012 20:15
TCP Echo Client in Golang
package main
import (
"net"
"os"
)
func main() {
strEcho := "Halo"
servAddr := "localhost:6666"
tcpAddr, err := net.ResolveTCPAddr("tcp", servAddr)
@teamon
teamon / Auth.scala
Created April 8, 2012 13:43
Play2.0 with Github OAuth2 example
package controllers
import lib._
import play.api.mvc._
import play.api.libs.json._
object Auth extends Controller {
val GITHUB = new OAuth2[GithubUser](OAuth2Settings(
@cliffdarling
cliffdarling / SvnExportExample.java
Created April 11, 2012 17:46
SVNKit export from Subversion example
import java.io.File;
import org.tmatesoft.svn.core.SVNDepth;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager;
import org.tmatesoft.svn.core.io.SVNRepository;
import org.tmatesoft.svn.core.io.SVNRepositoryFactory;
import org.tmatesoft.svn.core.wc.SVNClientManager;
import org.tmatesoft.svn.core.wc.SVNRevision;
def index(id:String) = Action {
getFirstData(id)
}
private def getFirstData(id:String) = {
Cache.get(id) match {
case Some(id2) => getSecondData(id2)
case None => NotFound
}
}
private def getSecondData(id2:String) = {
@uasi
uasi / git-svn.markdown
Last active May 27, 2024 04:48
git-svn の使い方メモ

git-svn の使い方メモ

git-svn の使い方をメモする。他によいプラクティスがあれば指摘していただけるとありがたい。

用語

SVN のブランチと git のブランチが混在しているため、ここではブランチという語を以下のように区別する。

  • ブランチ、 SVN ブランチ:$SVN_REPO/branches 以下にあるディレクトリ
  • ローカルブランチ:git のローカルブランチ
  • リモートブランチ:git のリモートブランチ
@repeatedly
repeatedly / d_master.md
Last active June 8, 2023 06:20
D言語基礎文法最速マスター

他の言語をある程度知っている人はこれを読めばD言語の基礎をマスターでき,D言語の氷山の一角くらいは知ることができると思います.対象バージョンはdmd 2.059です.

1. 基礎

ソースファイル

ASCIIかUTFしか受け付けません.それ以外の文字コードで書くとコンパイルエラーになります.

main

D言語のmainはCとは違い以下のようなシグネチャです.

@seratch
seratch / readme.md
Created May 18, 2012 00:51
Finagle Developer Guide (December 15, 2011 Draft) の適当な和訳

細かい点で間違いなどあるかと思います。fork して直していただけると助かります。

Finagle is built using sbt. We've included a bootstrap script to ensure the correct version of sbt is used. To build:

Finagle は sbt を使ってビルドしています。私たちは確実に適切なバージョンの sbt を使うようにブートストラップ用のスクリプトを含めています。このように実行します。

    $ ./sbt test