Skip to content

Instantly share code, notes, and snippets.

David Barri japgolly

Block or report user

Report or block japgolly

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
Mzk-Levi / ncompositions.scala
Last active Mar 24, 2018
Horizontal & Vertical Compositions of Natural Transformations
View ncompositions.scala
trait Functor[F[_]] {
def map[A, B](as: F[A])(f: A => B): F[B]
object Functor {
def apply[F[_]](implicit e: Functor[F]): Functor[F] = e
trait ~>[F[_], G[_]] {
def apply[A](x: F[A]): G[A]
staltz /
Last active Oct 21, 2019
The introduction to Reactive Programming you've been missing
arosien / runar-io-free.scala
Last active Sep 10, 2016
Translation of Runar's ScalaIO 2013 presentation on IO and Free monads ( to scalaz.
View runar-io-free.scala
import scalaz._
import Scalaz._
import Free._
/** "Pure" interactions with a console. */
sealed trait Console[+A]
case class GetLine[A](k: String => A) extends Console[A]
case class PutLine[A](s: String, a: A) extends Console[A]
object Console {
xian /
Last active Dec 14, 2015 — forked from JakeWharton/
Here's the magic to get ActionBarSherlock working with Robolectric 2.0-alpha-2!

You need to add the files below, and do this once in your base test runner:

rgreenjr / postgres_queries_and_commands.sql
Last active Oct 21, 2019
Useful PostgreSQL Queries and Commands
View postgres_queries_and_commands.sql
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
shangaslammi / webspider.hs
Created Oct 4, 2011
Haskell Web Spider example
View webspider.hs
import Control.Exception
import Control.Monad
import Control.Monad.IO.Class
import Data.ByteString.Lazy (ByteString)
import Data.ByteString.Lazy.UTF8 (toString)
import Data.Function
import Data.Enumerator
import Data.List
import Data.Maybe
hagenburger / javascript_loader.js
Created Jul 30, 2010
Dynamically load JavaScript files with callback when finished
View javascript_loader.js
// Example:
// With callback (that’s the good thing):
JavaScript.load("", function() {
API.use(); // or whatever api.js provides ...
You can’t perform that action at this time.