I use split-newlines-and-parse-stringified-json.jq
to make json, usually from logs, more readable:
It recursively:
- splits strings containing newlines into arrays
- expands escaped tabs into spaces
- expands stringified json
$ echo '{
"foo": 42,
I use split-newlines-and-parse-stringified-json.jq
to make json, usually from logs, more readable:
It recursively:
$ echo '{
"foo": 42,
I hereby claim:
To claim this, I am signing this object:
// https://speakerdeck.com/dwestheide/dont-fear-the-implicits-everything-you-need-to-know-about-typeclasses | |
object `Preview: implicits can be used for...` { | |
trait Dependencies[T] { | |
import scala.concurrent.{ExecutionContext, Future} | |
def map[S](f: T => S)(implicit executor: ExecutionContext): Future[S] | |
} |
// http://aperiodic.net/phil/scala/s-99/ | |
// https://gist.github.com/kevincairo/e91ef4e289a1892065d7eb1aef805f0a | |
import scala.annotation.tailrec | |
import scala.util.Random.nextInt | |
import scala.util.Try | |
def list(range: Range): List[Int] = range.toList | |
def rand(range: Range): Int = range(nextInt(range.length)) | |
def repeat[A](n: Int): A => List[A] = List.fill(n)(_: A) | |
def repeatr[A](r: Range): A => List[A] = repeat(rand(r)) |
float square(float t) { | |
return step(0.0, sin(t)); | |
} | |
void main () { | |
vec2 uv = uv(); | |
vec2 uvN = uvN(); | |
vec3 c = black; | |
float t = time / 24.; |