I hereby claim:
- I am rethab on github.
- I am rethab (https://keybase.io/rethab) on keybase.
- I have a public key whose fingerprint is E235 F740 4419 5B4B 29EC 3437 CBF2 2CB7 67D3 0264
To claim this, I am signing this object:
.data | |
.stringfmt: | |
.string "'%s'\n" | |
.s1: | |
.asciz "ab" | |
.s2: | |
.asciz "cd" | |
.text | |
.global main |
.data | |
.stringfmt: | |
.string "'%s'\n" | |
.s1: | |
.asciz "ab" | |
.s2: | |
.asciz "cd" | |
.text | |
.global main |
import qualified Data.ByteString.Lazy.Char8 as B | |
import Data.Maybe (catMaybes) | |
import Data.List (isPrefixOf) | |
import System.Directory (doesFileExist, canonicalizePath) | |
main :: IO () | |
main = mountedDevices ["mapper/home"] >>= print | |
mountedDevices :: [String] -> IO [(String, String)] |
I hereby claim:
To claim this, I am signing this object:
import play.api.inject.{QualifierInstance, BindingKey} | |
import com.google.inject.name.Names | |
val injector = ??? | |
injector.instanceOf(BindingKey(classOf[MyType], Some(QualifierInstance(Names.named("my-thing"))))) |
private def block[T](f: Future[T]): T = { | |
val barrier = new CountDownLatch(1) | |
import play.api.libs.concurrent.Execution.Implicits.defaultContext | |
f onComplete {_ => | |
barrier.countDown() | |
} | |
barrier.await(30, TimeUnit.SECONDS) |
import java.util.concurrent.TimeUnit | |
import scala.concurrent.duration.Duration | |
import scala.concurrent.{Await, Future} | |
/** | |
* Test if Futures are cancelled once the duration of | |
* the await has timed out. | |
* | |
* This demonstrates, that even after the 'Await.result' |
/** | |
* Provides Messages implicit and the default Guice-Container | |
* into the context for testing Play 2.4 applications. | |
* | |
* Sample: | |
* | |
* "use the overridden bindigs" in new WithFancyApp( | |
* lang = Lang("en", "US"), | |
* overrideModules = Seq(bind[MyInterface].to[MyImplementation]) | |
* ) { |
<?php | |
// droid is coming from testnow.php | |
// all this app can do. corresponding functions are | |
// named do_XXX where XXX is the action | |
$actions = array('create', 'list', 'done', 'exit'); | |
// database as array. read when started, saved on exit. | |
$data = null; |
{-# LANGUAGE RecordWildCards #-} | |
import Control.Arrow (second) | |
import Control.Applicative ((<$>), (<*>)) | |
import Data.List (groupBy, genericLength) | |
import System.Console.GetOpt (ArgDescr(..), ArgOrder(..)) | |
import System.Console.GetOpt (OptDescr(..), getOpt, usageInfo) | |
import System.IO (hPutStrLn, stderr) | |
import System.Environment (getArgs) | |
import System.Exit (exitFailure) |