I hereby claim:
- I am dagoof on github.
- I am fingernails (https://keybase.io/fingernails) on keybase.
- I have a public key ASBBYS5_WGJMOULIpYlaC3T1lCq3JuVsVinoFw1aLBwgPQo
To claim this, I am signing this object:
type Counter struct { | |
value int32 | |
mutex sync.Mutex | |
} | |
func (c *Counter) Increment() { | |
defer c.mutex.Unlock() | |
c.mutex.Lock() | |
atomic.AddInt32(&c.value, 1) | |
} |
module Nonempty : sig | |
type 'a t | |
val init : 'a -> 'a t | |
val create : 'a -> 'a list -> 'a t | |
val head : 'a t -> 'a | |
val extend : 'a t -> 'a list -> 'a t | |
val replace: 'a t -> 'a list -> 'a t | |
val merge: 'a t -> 'a t -> 'a t | |
val of_list : 'a list -> 'a t option | |
val to_list : 'a t -> 'a list |
module type SIG = sig | |
type 'a t | |
val bind : 'a t -> ('a -> 'b t) -> 'b t | |
val return : 'a -> 'a t | |
end | |
module Make (M : SIG) = struct | |
include M | |
let join mm = bind mm (fun x -> x) | |
let map f m = bind m (fun x -> return (f x)) |
import React, { Component } from 'react' | |
import { InMemoryCache } from 'apollo-cache-inmemory' | |
import ApolloClient from 'apollo-client' | |
import { ApolloProvider, graphql } from 'react-apollo' | |
import { HttpLink } from 'apollo-link-http' | |
import gql from 'graphql-tag' | |
const client = new ApolloClient({ | |
ssrMode: true, | |
link: new HttpLink({ uri: 'https://graphql-pokemon.now.sh' }), |
I hereby claim:
To claim this, I am signing this object:
open Batteries | |
open Tsdl | |
exception Fucked of string | |
let width = 640 | |
let height = 480 | |
let pi = 4.0 *. atan 1.0 | |
let value = function |
// RecoveringSession is a session that has methods of ensuring it is still | |
// alive. | |
type RecoveringSession struct { | |
*mgo.Session | |
} | |
// EnsureAlive attempts to ping the session, and refreshes it if something has | |
// gone wrong. | |
func (s *RecoveringSession) EnsureAlive() { | |
// Squelch mgo panicing over a closed session |
package main | |
import ( | |
"flag" | |
"io" | |
"log" | |
"net" | |
"os" | |
) |
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
) | |
var ( |
package main | |
import ( | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
) |