Skip to content

Instantly share code, notes, and snippets.

@cloudRoutine
cloudRoutine / unity3d.gitignore
Created August 3, 2015 08:16
Unity3d gitignore
#=====================
# Unity Project Files
#=====================
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
*.userprefs
@cloudRoutine
cloudRoutine / Microsoft.PowerShell_profile.ps1
Last active December 8, 2024 03:19
Powershell Profile for use with Cmder
# If this script is throwing an error near a Unicode symbol try resaving the file as UTF-8 with BOM
$psmodules = ";~\Documents\WindowsPowerShell\Modules"
# sometimes the module paths has been fucked before posh loads, but that won't stop us
$env:PSModulePath = $env:PSModulePath + $psmodules
# Set the OutputEncoding to Unicode so that the λ renders properly
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
@cloudRoutine
cloudRoutine / morphisms.fs
Created December 24, 2014 08:10
Morphisms
module Morphisms =
/// Hylomorphism that composes an unfold into a fold
/// folding an unfold
// ( fold o unfold )(x) = fold (unfold(x))
let hylomorphism
(ufstepfn:#seq<'b>->'b->#seq<'b>)(ufacc:#seq<'b>)(pred:'a->bool)(mapElm:'a->'b) (inc:'a->'a)
(fstepfn:'c->'b->'c) (foldAcc :'c) : 'a -> 'c =
(Folds.unfold ufstepfn ufacc pred mapElm inc ) >> (Folds.foldl fstepfn foldAcc )
@cloudRoutine
cloudRoutine / 01querylistboxhelpers.fs
Last active August 29, 2015 14:12
Polymorphic WPF GUI Controls with F#
namespace ViewModels
open System.Windows
open System.Windows.Controls
open System.Windows.Documents
open System.Windows.Media
open GUIControls.Extensions
open GUIControls.Patterns
open System.Windows.Interactivity
@cloudRoutine
cloudRoutine / gridcontroller.cs
Created December 24, 2014 06:12
Grid Controller - Unity Editor Extensions
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
using UnityEditor;
using HexMap;
using ExtensionMethods;
@cloudRoutine
cloudRoutine / struct_lens.fsx
Last active August 29, 2015 14:12
Struct Lens
[<Struct>]
type Lens<'Struct,'Prop> =
val Get : 'Struct -> 'Prop
val Set : 'Prop -> 'Struct -> 'Struct
member lens.Update func prop =
let value = lens.Get prop
let result = func value
lens.Set result prop
@cloudRoutine
cloudRoutine / fscheck_doc_old.fsx
Created December 14, 2014 17:04
Old FsCheck Documentation (v 0.6)
(*===============================
|| ||
|| QuickStart ||
|| ||
===============================*)
// A simple example of a property definition is
let prop_RevRev xs = List.rev(List.rev xs) = xs
@cloudRoutine
cloudRoutine / GenerateXMPToolkitSDK_vc12.bat
Created December 13, 2014 04:41
XMP Toolkit Generate Visual Studio Solution Script updated for VS 2013
:: =================================================================================================
:: Copyright 2013 Adobe Systems Incorporated
:: All Rights Reserved.
::
:: NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
:: of the Adobe license agreement accompanying it.
:: =================================================================================================
echo OFF
cls
@cloudRoutine
cloudRoutine / CMakeUtils.bat
Created December 13, 2014 04:39
XMP Toolkit CMake script update for VS 2013
:: =================================================================================================
:: Copyright 2013 Adobe Systems Incorporated
:: All Rights Reserved.
::
:: NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
:: of the Adobe license agreement accompanying it.
:: =================================================================================================
REM Available Arguments:
REM [64|32] Bit Architecture (optional, 64 is default)