This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// JsonReader.cs | |
// Copyright 2011 Alexander Corrado | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining | |
// a copy of this software and associated documentation files (the | |
// "Software"), to deal in the Software without restriction, including | |
// without limitation the rights to use, copy, modify, merge, publish, | |
// distribute, sublicense, and/or sell copies of the Software, and to | |
// permit persons to whom the Software is furnished to do so, subject to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# This mtouch wrapper adds an argument for a "postcompile" command to be run | |
# after the managed code is compiled to IL but before it is compiled to native code. | |
# | |
# It may be passed as "Additional mtouch arguments" in MD like so: | |
# | |
# -postcompile "mono ${SolutionDir}/postcompiler.exe ${TargetPath}" | |
# | |
# To use, rename mtouch to mtouch_real and put this script in its place. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Now with more love at: | |
// https://github.com/chkn/JSON.cs/blob/master/JSON.cs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Runtime.Serialization.Formatters.Binary; | |
using Android.OS; | |
using Android.App; | |
using Android.Content; | |
public static class AndroidExtensions { | |
static BinaryFormatter binaryFormatter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class LocalCache { | |
static HashSet<string> tempKeys = new HashSet<string> (); | |
public static Task<Stream> GetCachedOrDownload (string key, Uri uri, bool temporary = true) | |
{ | |
return GetCachedOrDownload (key, uri, CreateNativeHttpClient, temporary); | |
} | |
public static Task<Stream> GetCachedOrDownload (string key, Uri uri, Func<HttpClient> createHttpClient, bool temporary = true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lldb | |
def monobt(debugger, command, result, dict): | |
target = debugger.GetSelectedTarget() | |
process = target.GetProcess() | |
thread = process.GetSelectedThread() | |
for frame in thread: | |
pc = str(frame.GetPCAddress()) | |
if pc[0] == '0': | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text; | |
using System.Linq; | |
using System.Threading; | |
using System.Reflection; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
public static class DI { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After about a year in the making for MimeKit and nearly 8 months for MailKit, | |
they've finally reached 1.0 status. | |
I started really working on MimeKit about a year ago wanting to give the .NET | |
community a top-notch MIME parser that could handle anything the real world could | |
throw at it. I wanted it to run on any platform that can run .NET (including mobile), | |
and do it with remarkable speed and grace. I wanted to make it such that re-serializing | |
the message would be a byte-for-byte copy of the original, so that no data would | |
ever be lost. This was also very important for my last goal, which was to support | |
S/MIME and PGP. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.Collections.Generic | |
type Foo() = | |
let list = List<obj>() | |
member x.List = list | |
type Bar() = | |
let doSomething (foo : Foo) = | |
let inner() = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static class Extensions { | |
#if __IOS__ | |
public static Font ToFont (this UIKit.UIFont font) | |
{ | |
return Font.OfSize (font.Name, font.PointSize); | |
} | |
#endif | |
} |