Skip to content

Instantly share code, notes, and snippets.

View devboy's full-sized avatar

Dominic Graefen devboy

View GitHub Profile
@devboy
devboy / config
Last active June 1, 2016 19:15
SSH connection via local or public ip depending on own ip (on OSX 10.11)
# ~/.ssh/config
Match originalhost somehost exec "bash -c '[ $(ipconfig getifaddr en0) = 192.168.0.40 ] && exit 0'"
HostName 192.168.0.50
Port 22
User user
Host somehost
HostName somehost.com
Port 8022
User user
module Shopify.Product.Model where
type alias Product =
{ created_at : String,
id : Int,
product_type : String,
published_at : String,
published_scope : String,
title : String,
updated_at : String,
==> make install
==> Cloning https://github.com/fsharp/fsharp.git
Cloning into '/opt/boxen/cache/homebrew/mono--fsharp--git'...
remote: Counting objects: 2228, done.
remote: Compressing objects: 100% (1641/1641), done.
remote: Total 2228 (delta 564), reused 1916 (delta 512), pack-reused 0
Receiving objects: 100% (2228/2228), 36.88 MiB | 8.20 MiB/s, done.
Resolving deltas: 100% (564/564), done.
Checking connectivity... done.
Note: checking out 'c5e345b194eaddad7f06d47cd944b098f3dbe325'.
using System;
using Wooga.Lambda.Control.Monad;
namespace Wooga.Lambda.Control.PatternMatching
{
public delegate Either<TResult, TValue> PatterMatch<TValue, TResult>();
public static class Pattern
{
public static PatterMatch<TValue, TResult> Match<TValue, TResult>(TValue x)
/// <summary>
/// Returns a sequence that when enumerated returns at most N elements.
/// </summary>
/// <param name="count">The maximum number of items to enumerate.</param><param name="source">The input sequence.</param>
/// <returns>
/// The result sequence.
/// </returns>
/// <exception cref="System.ArgumentNullException">Thrown when the input sequence is null.</exception>
[CompilationArgumentCounts(new int[] {1, 1})]
[CompilationSourceName("truncate")]
@devboy
devboy / travis.log
Created December 2, 2014 15:25
Travis can't load and/or unzip some dependecies via fake
No version specified. Downloading latest stable.
Starting download from https://github.com/fsprojects/Paket/releases/download/0.17.5/paket.exe
Paket version 0.17.5.0
found: /Users/travis/build/wooga/sbs-unity/paket.dependencies
Downloading fsharp/FAKE:2267f836a7a053f5caa8ac6dc7f897ea867ecb4c modules/Octokit/Octokit.fsx to /Users/travis/build/wooga/sbs-unity/paket-files/fsharp/FAKE/modules/Octokit/Octokit.fsx
@devboy
devboy / ThrottleAgent.fs
Created November 24, 2014 17:07
Some Throttle Agent in F#
namespace FSharp.Async
open System
open System.Collections.Generic
open System.Collections.Concurrent
type Agent<'T> = MailboxProcessor<'T>
[<ReferenceEquality>]
type Token = | Token of unit with
stdout:
Error writing C++ code for type System.Threading.CancellationTokenRegistration, method System.Boolean System.Threading.CancellationTokenRegistration::Equals(System.Threading.CancellationTokenRegistration), in assembly /Users/devboy/Development/devboy/FSharp.IL2CPP/unity3d/SomeUnityProject/Temp/StagingArea/Data/Managed/FSharp.Core.dll.
stderr:
Unhandled Exception:
System.NotImplementedException: The requested feature is not implemented.
at Unity.IL2CPP.StackAnalysis.StackStateBuilder.Build (IEnumerable`1 instructions) [0x00000] in <filename unknown>:0
at Unity.IL2CPP.StackAnalysis.StackStateBuilder.StackStateFor (IEnumerable`1 instructions, Unity.IL2CPP.StackAnalysis.StackState initialState, Mono.Cecil.MethodDefinition methodDefinition, ITypeProvider typeProvider, Unity.IL2CPP.ILPreProcessor.TypeResolver typeResolver) [0x00000] in <filename unknown>:0
at Unity.IL2CPP.StackAnalysis.StackAnalysis.Analyze () [0x00000] in <filename unknown>:0
at Unity.IL2CPP.StackAnalysis.StackAnalysis.Analyze
@devboy
devboy / NewBehaviourScript.cs
Last active August 29, 2015 14:08
F# Async Workflows Run Like A Charm On Unity3D
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
// Use this for initialization
void Start () {
Debug.Log ("Start");
Playground.AsyncTango();
Debug.Log ("Dancing The Tango");
type GameObject
{
int a;
int b;
int c;
}
type GameObjectWithCheats > GameObject
{
int d;