Skip to content

Instantly share code, notes, and snippets.

View mattleibow's full-sized avatar
🏠
Working from home

Matthew Leibowitz mattleibow

🏠
Working from home
View GitHub Profile
@mattleibow
mattleibow / xam-com-upl
Created June 23, 2014 14:15
xamarin-component upload
Matthew-Mac:restsharp matthew$ mono /Users/matthew/bin/xamarin-component.exe upload restsharp-104.4.0.xam
INFO (upload): Using server https://components.xamarin.com.
INFO (upload): Computed cookie jar path: /Users/matthew/.xamarin-credentials
INFO (upload): Extracted component ID "restsharp" and version "104.4.0" from package file.
INFO (check): Computed cookie jar path: /Users/matthew/.xamarin-credentials
INFO (check): Checking for component `restsharp' on components.xamarin.com...
INFO (check): Computed cookie jar path: /Users/matthew/.xamarin-credentials
INFO (check): Loading cookie jar from /Users/matthew/.xamarin-credentials.
INFO (check): Adding cookie for xamarin.com.
ERROR (check): Could not find component `restsharp', version 104.4.0 on components.xamarin.com!
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
<metadata minClientVersion="2.5">
<id>Testing.Xamarin.Android.Support</id>
<version>20.0.0-alpha1</version>
<title>Android Support Library (Testing)</title>
<authors>Matthew Leibowitz</authors>
<licenseUrl>http://components.xamarin.com/license/xamandroidsupportv4-18</licenseUrl>
<projectUrl>http://components.xamarin.com/view/xamandroidsupportv4-18</projectUrl>
<iconUrl>http://components.xamarin.com/resources/icons/component-824/icon_114x114.png</iconUrl>
@mattleibow
mattleibow / gist:98dfcd1fa6dec7c65895
Created August 20, 2014 12:55
Xamarin.Android.Support nuspec
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Xamarin.Android.Support</id>
<version>20.0.0-alpha2</version>
<title>Android Support Library</title>
<authors>Xamarin,Inc.</authors>
<licenseUrl>http://components.xamarin.com/license/xamandroidsupportv4-18</licenseUrl>
<projectUrl>http://components.xamarin.com/view/xamandroidsupportv4-18</projectUrl>
<iconUrl>http://components.xamarin.com/resources/icons/component-824/icon_114x114.png</iconUrl>
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
window = new UIWindow (UIScreen.MainScreen.Bounds);
var controller = new DialogViewController (new RootElement ("Refresh Test"));
controller.RefreshRequested += delegate { }; // <- This line makes the App well up with tears and then break down sobbing
window.RootViewController = controller;
window.MakeKeyAndVisible ();
@mattleibow
mattleibow / gist:b7a532cb52bd7026d4ff
Created October 15, 2014 11:59
Logging from Mono
20:26:02.7377190 - null - ChangeState(Disconnected, Connecting)
20:26:06.5976270 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - WS Connecting to: ws://signalrsamples.azurewebsites.net:80/signalr/connect?transport=webSockets&clientProtocol=1.4&connectionToken=NCFf9LEvzP%2FitH5sIzCh3%2FXIwL8C%2FSTaIx4EMtL7NFZ8SNoPFUf4WGl9q3E8c2fO%2B3uUjhNsb4a1lAT5vghU2vnUj8INW563M56TPGpUAc3wZcjartMDMtASYpJRALF6&connectionData=[{"Name":"HubConnectionAPI"}]
AFTER _webSocket.ConnectAsync
System.Net.WebSockets.ClientWebSocket
Open
BEFORE ProcessWebSocketRequestAsync
@mattleibow
mattleibow / gist:a1c0d058965056f06b98
Created October 25, 2014 19:00
base for saving android view state
// state that this view preserves
public class BaseInstanceState : Android.Views.View.BaseSavedState
{
// create a new state to be saved
public BaseInstanceState(IParcelable superState)
: base (superState)
{
}
[StructLayout(LayoutKind.Explicit)]
public struct StarPrinterStatus0
{
// printer status 1
[FieldOffset(0)]
public SM_BOOLEAN coverOpen;
[FieldOffset(32)]
public SM_BOOLEAN offline;
[FieldOffset(64)]
public SM_BOOLEAN compulsionSwitch;
INFO [2015-01-15 10:41:43Z]: PackagesViewModel error
System.AggregateException: One or more errors occurred ---> System.NullReferenceException: Object reference not set to an instance of an object
at System.IO.Packaging.Package.LoadRelationships () [0x001e9] in /private/tmp/source-mono-mac-3.12.0-branch-32/bockbuild-mono-3.12.0-branch/profiles/mono-mac-xamarin/build-root/mono-3.12.0/mcs/class/WindowsBase/System.IO.Packaging/Package.cs:338
at System.IO.Packaging.Package.get_Relationships () [0x0000b] in /private/tmp/source-mono-mac-3.12.0-branch-32/bockbuild-mono-3.12.0-branch/profiles/mono-mac-xamarin/build-root/mono-3.12.0/mcs/class/WindowsBase/System.IO.Packaging/Package.cs:86
at System.IO.Packaging.Package.GetRelationshipsByType (string) [0x00006] in /private/tmp/source-mono-mac-3.12.0-branch-32/bockbuild-mono-3.12.0-branch/profiles/mono-mac-xamarin/build-root/mono-3.12.0/mcs/class/WindowsBase/System.IO.Packaging/Package.cs:293
at NuGet.OptimizedZipPackage.EnsureManifest () <IL 0x00021, 0x00057>
at NuGet.O
ERROR [2015-01-15 10:58:52Z]:
System.NullReferenceException: Object reference not set to an instance of an object
at System.IO.Packaging.Package.LoadRelationships () [0x001e9] in /private/tmp/source-mono-mac-3.12.0-branch-32/bockbuild-mono-3.12.0-branch/profiles/mono-mac-xamarin/build-root/mono-3.12.0/mcs/class/WindowsBase/System.IO.Packaging/Package.cs:338
at System.IO.Packaging.Package.get_Relationships () [0x0000b] in /private/tmp/source-mono-mac-3.12.0-branch-32/bockbuild-mono-3.12.0-branch/profiles/mono-mac-xamarin/build-root/mono-3.12.0/mcs/class/WindowsBase/System.IO.Packaging/Package.cs:86
at System.IO.Packaging.Package.GetRelationshipsByType (System.String relationshipType) [0x00006] in /private/tmp/source-mono-mac-3.12.0-branch-32/bockbuild-mono-3.12.0-branch/profiles/mono-mac-xamarin/build-root/mono-3.12.0/mcs/class/WindowsBase/System.IO.Packaging/Package.cs:293
at NuGet.OptimizedZipPackage.EnsureManifest () [0x00000] in <filename unknown>:0
at NuGet.OptimizedZipPackage..ctor (IFileS
@mattleibow
mattleibow / gist:162d2a18a354251fa9e9
Created February 2, 2015 22:17
Preserving SWTableViewCell UI state
using System;
using Foundation;
using UIKit;
using System.Collections.Generic;
using SWTableViewCell;
using System.Linq;
namespace TestNamespace
{
public partial class TestViewController : UITableViewController