Skip to content

Instantly share code, notes, and snippets.

View timo-schmid's full-sized avatar
🏔️

Timo Schmid timo-schmid

🏔️
View GitHub Profile
@timo-schmid
timo-schmid / docker-compose.yml
Last active February 26, 2018 23:24
Updated docker-compose.yml for grin
version: '3.3'
services:
#Node 1: genesis and miner from build.md example
grin-genesis-miner:
build:
context: ..
dockerfile: base-build/Dockerfile
image: grin-min
command: ["server", "--mine", "-w", "http://grin-genesis-wallet:13415", "run"]
environment:
package btcboard.ui
import cats.Monad
import monocle.Lens
import scala.languageFeature.higherKinds
class Rx[A[_], T, O] private(t: T, lens: Lens[T, O], observers: T => A[Unit], monad: Monad[A]) {
def getT: T = t
(more sbt logs)
...
[info] [info] Created: /tmp/sbt_de9998c0/doobie/target/scala-2.10/codegen/main/com/example/user/User.scala
[info] [info]
[info] [info]
[info] [info]
[info] [info] package com.example.user
[info] [info]
[info] [info] case class User(
@timo-schmid
timo-schmid / imageAutocrop.php
Last active August 29, 2015 14:07
Functional image crop in PHP with GD
<?php
/**
* Functional approach of automatic image cropping, pass a file path and a color callback, which evaluates if a color is below the crop threshold or not.
* @param $path The path to the file
* @param $colorFilter Clojure, the function takes 1 parameter: $color is the hex value of the color to evaluate
* Code Example:
* <code>
* $newImg = $imageAutocrop($path, function($color) { return $color > 0xF0FFFF || $color === 0;});
* </code>