Skip to content

Instantly share code, notes, and snippets.

View Fristi's full-sized avatar

Mark Fristi

View GitHub Profile
@tpolecat
tpolecat / gist:5672105
Last active December 17, 2015 21:08
making scala stm look like haskell stm
package util
import scalaz.effect.IO
import scalaz._
import Scalaz._
import scala.concurrent.stm.{ retry => stmRetry, _ }
object X {
type STM[+A] = ReaderT[IO, InTxn, A]
import Data.Char
strong = and . sequence conditions
where conditions = [ (>14) . length
, any isUpper
, any isLower
, any isDigit
]
{-
@philcleveland
philcleveland / GetEventStoreEventDispatcher.cs
Last active June 8, 2016 23:04
Event dispatcher which receives events from the GetEventStore after they are saved. It takes the saved events and publishes them to the passed in Event Bus. This ensures that events are not published until they are saved in the GetEventStore. Big thanks to Andrii for all the reviews and coding help to get this thing working.
public class GetEventStoreEventDispatcher
{
private const int RECONNECT_TIMEOUT_MILLISEC = 5000;
private const int THREAD_KILL_TIMEOUT_MILLISEC = 5000;
private const int READ_PAGE_SIZE = 500;
private const int LIVE_QUEUE_SIZE_LIMIT = 10000;
private readonly IEventBus _eventBus;
private readonly EventStoreConnection _store;
@haf
haf / Topshelf.FSharp.fs
Last active October 11, 2017 13:23
Configure TopShelf in F#
namespace Topshelf
[<AutoOpen>]
module Topshelf =
open System
open Topshelf.HostConfigurators
open Topshelf.Runtime
let configureTopShelf f =
@Peratryn
Peratryn / achievement.json
Last active October 24, 2018 17:24
WoW Community API Json Examples
{
"accountWide": true,
"criteria": [
{
"description": "To Honor One's Elders",
"id": 7553,
"max": 1,
"orderIndex": 0
},
{
@kings13y
kings13y / MinimalSoapServer.scala
Created February 2, 2011 21:53
Minimal Soap Server using Scala and JDK6 annotations
import javax.jws.WebService
import javax.jws.soap.SOAPBinding
import javax.jws.soap.SOAPBinding.Style
import javax.xml.ws.Endpoint
@WebService(targetNamespace="org.scalabound.test", name="org.scalabound.test", portName="test", serviceName="WSTest")
private class MinimalSoapServer {
@SOAPBinding(style = Style.RPC)
def test(value : String) = "Hi " + value