Skip to content

Instantly share code, notes, and snippets.

@flq
flq / GetWSDLs.ps1
Created August 17, 2017 08:23
Acccess discovery service, download all WSDLs for listed services
function indent([parameter(ValueFromPipeline)]$Content)
{
$StringWriter = New-Object System.IO.StringWriter
$XmlWriter = New-Object System.XMl.XmlTextWriter $StringWriter
$xmlWriter.Formatting = "indented"
$xmlWriter.Indentation = 2
$Content.WriteContentTo($XmlWriter)
$XmlWriter.Flush()
$StringWriter.Flush()
Write-Output $StringWriter.ToString()
@flq
flq / BitempTests.fs
Last active December 16, 2016 13:15
Bitemporal code samples
module BitempTests
type TimePoint<'S> = {
recorded : int;
actual : int;
state : 'S;
}
type HistoryEntry<'S> = {
time : int;

Keybase proof

I hereby claim:

  • I am flq on github.
  • I am fquednau (https://keybase.io/fquednau) on keybase.
  • I have a public key ASDraf_OUnnhDWmgwKEoWTSV7QHQ1pjDPm0pCCSGME0ttwo

To claim this, I am signing this object:

@flq
flq / IiUnitTests.cs
Last active December 30, 2015 21:40
Gist for using NMeasure for surplus energy in atmosphere...
using System.Collections.Generic;
using Xunit;
using static NMeasure.U;
using static NMeasure.Tests.IiUnits;
namespace NMeasure.Tests
{
public class IIUnitsTests
{
public IIUnitsTests()
@flq
flq / euler001.hs
Last active December 24, 2015 08:09
Euler Problems solved with Haskell
-- http://projecteuler.net/problem=1
sum [x | x <- [0..999], any (\d -> mod x d == 0) [3,5]]
@flq
flq / spaceinvaders.hs
Created September 10, 2013 20:39
A subset of the Space invaders game with moving left/right, shooting with space. The "game" ends when exiting with x or all enemies being dead.h
module Main where
import Control.Monad
import Data.List (maximumBy,minimumBy,find,(\\))
import Data.Ord
import Graphics.UI.SDL as FX
type Point = (Int,Int)
type MovementPattern = [(Movement, [(Int, Int)] -> Bool)]
- Cloned from a remote repository
- Initialized an empty repository
- Pulled from a remote repository
- Made first commit
- Pushed to a remote repository
- Made first local branch
- Pushed a new branch
- Added a second remote
- Merged a branch into another one
- Deleted a local branch
@flq
flq / EntryPoint.ts
Last active October 10, 2015 23:45
Gists for the blog post porting react app to tyescript
import {assign} from 'lodash'
function startModule() {
//etc.
}
global['Project'] = assign(global['Project'] || {}, {
startModule
});
@flq
flq / Program.cs
Created September 14, 2012 07:40
Prog to start a difftool and remap the files as they are deleted by git in order to open all files at once
using System;
using System.Configuration;
using System.Diagnostics;
using System.IO;
namespace DifftoolStarter
{
class Program
{
static void Main(string[] args)
@flq
flq / zzz.ps1
Created February 9, 2012 09:35
Powershell function to bring your PC to sleep
function zzz {
$source = @"
[DllImport("powrprof.dll")]
public static extern void SetSuspendState(bool hibernate, bool forceCritical, bool disableWakeEvent);
"@
$app = Add-Type -Namespace "Standby" -MemberDefinition $source -Name Sleep -PassThru;
$app::SetSuspendState($false,$true,$false);
}