Skip to content

Instantly share code, notes, and snippets.

Thomas Bandt aspnetde

Block or report user

Report or block aspnetde

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View App.fs
namespace FabulousSubModules
open Fabulous.Core
open Fabulous.DynamicViews
open Xamarin.Forms
module App =
type Model =
{ Global: GlobalModel
Page1: Page1.Model
View fsharp-formatting.fsx
namespace Foo
module Bar =
let RelationsReducer (state:RelationState) action =
match action with
| ActivitiesRequestSucceeded (id, items)
-> { state with FacilityActivity = state.FacilityActivity |> Array.filter (fun (f, _) -> f <> id)
|> Array.append (items |> Array.map (fun item -> (id, item.Id))) }
| _ -> state
@aspnetde
aspnetde / ggt.fsx
Created Jun 20, 2017
Erweiterter Euklidischer Algorithmus
View ggt.fsx
let rec ggT a b =
let r = a % b
if r = 0 || r = b then
b, 0, 1
else
let q = a / b
let g, s, t = ggT b r
g, t, s - q * t
@aspnetde
aspnetde / demo.fsx
Created May 7, 2017
F# Interactive -> System.BadImageFormatException (Mono)
View demo.fsx
#r "System.Net.Http"
open System.Net.Http
type Foo = Foo of HttpRequestMessage
@aspnetde
aspnetde / DroidTlsClientHandler.cs
Created Jan 17, 2017
An AndroidClientHandler implementation supporting Certificate Pinning
View DroidTlsClientHandler.cs
using System.IO;
using Java.Security;
using Java.Security.Cert;
using Javax.Net.Ssl;
using Xamarin.Android.Net;
namespace NeunundsechzigGrad.Foo
{
public class DroidTlsClientHandler : AndroidClientHandler
{
View foo.fs
[<Test>]
let ``Die Backtick-Syntax ist eigentlich ganz cool, wenn man sich mal daran gewöhnt hat.``() =
Assert.IsTrue(true)
@aspnetde
aspnetde / fake-failing-test.fsx
Created Oct 6, 2016
FAKE Failing Test (with PlistBuddy)
View fake-failing-test.fsx
#r "tools/FAKE/FakeLib.dll"
open Fake
open System
open System.IO
let Exec command args =
let result = Shell.Exec(command, args)
if result <> 0 then failwithf "%s exited with error %d" command result
@aspnetde
aspnetde / gist:511c72e743fb658f71f186df12fca85d
Last active Oct 2, 2016
Der perfekte Workflow für Pull-Requests (als Werkzeug für Code-Reviews)?
View gist:511c72e743fb658f71f186df12fca85d
Pull-Requests funktionieren wunderbar für kleinere Sachen: Bugfixes, kleinere Features.
Alles, wo die Anzahl der Changes überschaubar bleibt und sich ein Review in kurzer Zeit
gut bewerkstelligen lässt. Siehe: http://blog.ploeh.dk/2015/01/15/10-tips-for-better-pull-requests/
Die Frage ist, wie man das bei größeren Features organisiert.
Angenommen ein Entwickler bekommt die Aufgabe, ein komplett neues Modul in einer App
zu bauen. Bricht man die Aufgabe – was für die Reviews wichtig ist – in kleine
Einheiten auf, hilft das sicherlich auch schon mal allgemein bei der Strukturierung.
@aspnetde
aspnetde / PdfMerger.cs
Last active Apr 20, 2016
Merge Pdfs on the fly with Xamarin.iOS
View PdfMerger.cs
public class PdfMerger
{
private readonly IFileSystemUtility _fileSystem;
public PdfMerger(IFileSystemUtility fileSystem)
{
_fileSystem = fileSystem;
}
public string Merge(params string[] paths)
@aspnetde
aspnetde / upload-ipa-to-itunes-connect.sh
Created Nov 26, 2015
A small script that uses XCode's Application Loader to automatically submit an IPA to iTunes Connect
View upload-ipa-to-itunes-connect.sh
#!/bin/bash
set -ex
# Originally from https://gist.github.com/jedi4ever/b1f8b27d4a803d487fa4
# This scripts allows you to upload a binary to the iTunes Connect Store and do it for a specific app_id
# Because when you have multiple apps in status for download, xcodebuild upload will complain that multiple apps are in wait status
# Requires application loader to be installed
# See https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/SubmittingTheApp.html
You can’t perform that action at this time.