Skip to content

Instantly share code, notes, and snippets.

Shingo Omura everpeace

Block or report user

Report or block everpeace

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@halcat0x15a
halcat0x15a / TwitterMachine.scala
Last active Dec 15, 2015
Twitter User Streams with scala-machines!
View TwitterMachine.scala
import scala.language.postfixOps
import java.io._
import scalaj.http._
import scalaz._, Scalaz._
import scalaz.effect._, Effect._, IO._
import scalaz.concurrent.Promise
@abe4tawa8
abe4tawa8 / github-setup.rb
Created Apr 22, 2012
git-dojo setup script
View github-setup.rb
#!/usr/bin/env ruby
require 'octokit'
require 'csv'
user_login = 'username'
user_password = 'password'
organization = 'git-dojo'
csv_file = ARGV.first || abort("Usage: #{$0} <csv-file>")
View refactor.scala
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) = {
@j5ik2o
j5ik2o / gist:1611868
Created Jan 14, 2012
AOPを使わなくても処理の始まりと終わりにログを出力するtrait
View gist:1611868
import scala.util.DynamicVariable
import scala.collection.immutable
import grizzled.slf4j.Logging
trait LoggingEx extends Logging {
private val msgs = new DynamicVariable[Seq[String]](immutable.Queue.empty)
private def withScope[T](msg: String, logger: (=> Any, => Throwable) => Unit, f: => T): T = {
val newMsgs = msgs.value :+ msg
You can’t perform that action at this time.