I hereby claim:
- I am olix0r on github.
- I am olix0r (https://keybase.io/olix0r) on keybase.
- I have a public key whose fingerprint is 2DD1 B90B 6EAA AD36 CF44 DE78 B1D8 3BB8 13B1 7069
To claim this, I am signing this object:
(ns gob.core | |
[:use [clojure.core.reducers :only (cat)]] | |
[:use [clojure.string :only (join)]]) | |
(def penus "PENUS") | |
(defn env-columns [config] | |
(let [columns (System/getenv "COLUMNS")] | |
(if (nil? columns) | |
config |
I hereby claim:
To claim this, I am signing this object:
/// Food, food, food. I love food. | |
pub mod food { | |
use std::rand::{Rand, Rng}; | |
/// All food has calories | |
pub trait Food { | |
fn calories(&self) -> u64; | |
} | |
/// There are some things you can eat for breakfast. |
package main | |
type Goaled interface { | |
Goaled() bool | |
} | |
type Sane interface { | |
Sane() bool | |
} |
case class WatchEvent(kind: String) | |
class Api(client: Service[Request, Resopnse]) { | |
def mkreq(): Request = ??? | |
def watch(): AsyncStream[WatchEvent] = | |
for { | |
rsp <- AsyncStream.fromFuture(client(mkreq())) | |
watch <- rsp.status match { |
package com.twitter.finagle.httpx | |
import org.jboss.netty.handler.codec.http.multipart.HttpPostRequestEncoder | |
/** | |
* A goddamned awful hack. | |
*/ | |
object PostRequestEncoder { | |
def encode(req: Request, params: Seq[(String, String)]): Unit = { |
#!/bin/sh | |
set -e | |
# When the current branch has been merged to the origin, update master | |
# and delete the local branch. | |
branch=$(git rev-parse --abbrev-ref HEAD) | |
if [ -z "$branch" ]; then |
(ns gob.core) | |
(use '[clojure.string :only (join)]) | |
(def penus "PENUS") | |
(defn env-columns [config] | |
(let [columns (System/getenv "COLUMNS")] | |
(if (nil? columns) | |
config |
import com.twitter.finagle.{Filter, Service} | |
import com.twitter.util.{Await, Future} | |
case class Fruit(flavor: String) | |
case class Veggie(flavor: String) | |
case class Jam(flavor: String) | |
object Jammer extends Service[Veggie, Jam] { | |
def apply(veg: Veggie) = | |
Future value Jam(veg.flavor) |
def call(): Future[String] = ??? | |
val strings = Var.async[Try[String]](None) { strings => | |
def loop(): Future[Unit] = | |
call().transform { | |
case Return(s) => | |
strings() = Return(s) | |
Future.sleep(1.minute).before(loop()) | |
case Throw(NonFatal(e)) => | |
strings() = Throw(e) |