Skip to content

Instantly share code, notes, and snippets.

View kolektiv's full-sized avatar
💭
Building myself a secondary brain...

Andrew Cherry kolektiv

💭
Building myself a secondary brain...
View GitHub Profile
@kolektiv
kolektiv / keybase.md
Last active August 29, 2015 14:07
Keybase Verification

Keybase proof

I hereby claim:

  • I am kolektiv on github.
  • I am kolektiv (https://keybase.io/kolektiv) on keybase.
  • I have a public key whose fingerprint is 622B DD92 AFB2 453A DFD9 2B42 EC8F 8458 216C 0FBD

To claim this, I am signing this object:

@kolektiv
kolektiv / gist:171d536a64944c006011
Created March 11, 2015 09:27
Chiron single case union
type TestUnion =
| Union of string
type TestContainer =
{ Test: TestUnion }
static member FromJson (_: TestContainer) =
fun t ->
{ Test = Union t }
<!> Json.read "union"
type Example =
| IntCase of int
| StringCase of string
let intExample = IntCase 5 // type - Example
let stringExample = StringCase "hello"
type ExampleRecord =
{ ExampleField: Example }
let t2 =
TopicDescription "testtopic2"
let t3 =
TopicDescription "testtopic3"
let setup =
ServiceBus.run (
ServiceBus.liftNamespace (
Namespace.Topics.create t3
@kolektiv
kolektiv / gist:2762765
Created May 21, 2012 14:55
SpahQL experiments
var spahql = require('spahql');
var response = {
_id: '0',
text: 'some text',
sources:
[
{
_id: '1',
innerText: 'some inner text'
@kolektiv
kolektiv / gist:2762802
Created May 21, 2012 15:02
SpahQL usefulness
var response = spahql.db(data);
response.select('//_id').renameAll('id');
response.select('//auth').destroyAll();
// return response.value();
package main
import (
"fmt"
"time"
)
func main() {
i := 0
t := time.Now()
@kolektiv
kolektiv / Snowflake Code Dump
Created December 29, 2014 17:35
Snowflake Generation
module Cells =
// Types
type LifeSpec =
| LifeSpec of GenerationSpec list
and GenerationSpec =
| GenerationSpec of strength: int * liveness: (int -> bool)
@kolektiv
kolektiv / monadic.fs
Created January 8, 2016 17:23
Overloading monadic operators?
// Implementations
module Reader =
let bind (f: 'e -> 't, binder: 't -> 'e -> 'u) : 'e -> 'u =
fun e ->
binder (f e) e
// Specializations
@kolektiv
kolektiv / html.fs
Last active July 14, 2016 17:18
HTML CompEx playground
// Builder
type Builder<'a> (operations: BuilderOperations<'a>) =
member __.Return _ : 'a =
operations.Init ()
member __.ReturnFrom (c: 'a) : 'a =
c