Skip to content

Instantly share code, notes, and snippets.

View MadsBogeskov's full-sized avatar

Mads Bøgeskov MadsBogeskov

  • Lunar
  • Aarhus, Denmark
View GitHub Profile

Keybase proof

I hereby claim:

  • I am madsbogeskov on github.
  • I am madsbogeskov (https://keybase.io/madsbogeskov) on keybase.
  • I have a public key ASBXmCZ6cgHI-JyeCfbfrKI9mQTPmnF7QrX1SQ7Vnfoaywo

To claim this, I am signing this object:

@MadsBogeskov
MadsBogeskov / WWWResponseHeaders.cs
Created April 27, 2016 12:59
The builtin WWW.responseHeaders property does not return all actual headers. E.g. if a request has multiple 'Set-Cookies' then the native will only return one of them. This is because the builtin function returns a Dictionary<string, string> which cannot have multiple keys with the same name. This extension to the WWW class makes it possible to …
using UnityEngine;
using System.Text.RegularExpressions;
using System.Reflection;
using System.Linq;
using System.Collections.Generic;
/// <summary>
/// Extensions for the WWW class
/// </summary>
public static class WWWExtension
@MadsBogeskov
MadsBogeskov / validationCheckWithRxCocoaAndRxSwift.swift
Last active January 16, 2016 19:32
Enabling UIButton using RxSwift and RxCocoa
let nameFieldIsValidObservable = nameInputField.rx_text.map {
$0.characters.count > 0
}
let otherNameFieldIsValidObservable = otherNameInputField.rx_text.map {
$0.characters.count > 0
}
let m = Observable.combineLatest(nameFieldIsValidObservable, otherNameFieldIsValidObservable) { (nameIsValid, otherNameIsValid) in
return nameIsValid && otherNameIsValid