Skip to content

Instantly share code, notes, and snippets.

View berlamont's full-sized avatar

Robert Strand berlamont

View GitHub Profile
@berlamont
berlamont / xamarinandroidbindings.md
Created March 12, 2024 10:36 — forked from JonDouglas/xamarinandroidbindings.md
Xamarin Android Bindings Troubleshooting

Approaching a Xamarin.Android Bindings Case

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Binding is to first ensure you have the proper tooling available:

@berlamont
berlamont / setup.ps1
Created May 24, 2018 00:19 — forked from labaneilers/setup.ps1
Windows dev setup
# Boxstarter options
$Boxstarter.RebootOk=$true # Allow reboots?
$Boxstarter.NoPassword=$false # Is this a machine with no login password?
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot
Update-ExecutionPolicy Unrestricted
Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
Disable-InternetExplorerESC
@berlamont
berlamont / ASPNET-MVC-OSX-Apache.md
Created February 28, 2018 01:20 — forked from labaneilers/ASPNET-MVC-OSX-Apache.md
Setting up ASP.NET MVC 5 via Mono on Mac OSX, with Apache

Install ASP.NET MVC 5 on Mono, Mac OSX, apache with mod_mono

Install mono MDK

  • NOTE: no x64 package is available (unless you want to install from source), so I installed the x86 version

  • Install mono MDK from:

http://www.mono-project.com/download/

I used 3.10.0, which corresponds to .NET 4.5

@berlamont
berlamont / WindowsFormToXaml.cs
Created February 7, 2018 03:18 — forked from CADbloke/WindowsFormToXaml.cs
Windows Forms to XAML Converter
// based on http://robrelyea.wordpress.com/2007/02/10/winforms-xaml/
// converted to an Extension Method by @CADbloke
// a list: http://msdn.microsoft.com/en-us/library/ms750559(v=vs.110).aspx
// here's moar code:http://wf2wpf.codeplex.com/SourceControl/latest but it converts source files, not actual controls.
// Here's a site that does code too http://www.win2wpf.com/
// http://www.codeproject.com/Articles/25795/Creating-the-Same-Program-in-Windows-Forms-and-WPF
// ReSharper disable SpecifyACultureInStringConversionExplicitly
using System;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Threading;
namespace WpfApplication1
{
public class AsyncObservableCollection<T> : ObservableCollection<T>
{
private readonly SynchronizationContext _synchronizationContext = SynchronizationContext.Current;
@berlamont
berlamont / INotifyPropertyChangedExtensions.cs
Created October 17, 2017 16:39 — forked from LeeCampbell/INotifyPropertyChangedExtensions.cs
Extension methods to help with INotifyPropertyChanged interface (and ObservableCollection<T>)
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
//TODO: Allow the ability to provide multiple properties to WhenPropertyChanges
@berlamont
berlamont / httpclientservice.cs
Created October 5, 2017 06:36
Httpservice boilerplate
public class HttpClientService : IServerService
{
private HttpClient _httpClient;
private string _token = "YWRtaW46MTIz";
public HttpClientService()
{
_httpClient = new HttpClient();
}
@berlamont
berlamont / EnumItemMap.cs
Created October 3, 2017 18:00
Enum to Item Map
/*
* Given an enum, construct a map where the keys are the enum items
* and the values are string descriptions of each item. Example:
*
* {TheFirst, "The First"},
* {TheSecond, "The Second"},
* {AndTheLast, "And The Last"},
*
* Thus each enum item is converted to text and split at each capital letter.
*/
@berlamont
berlamont / MemoryHelper.cs
Created October 3, 2017 04:37
Read and Write Ram
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace memoryReader
{
static class Memory
{
@berlamont
berlamont / HttpUtility.cs
Created September 8, 2017 07:01
Url Parsing Extensions
public static class HttpUtility
{
/// <summary>
/// Tries to parse the query as relative or absolute uri
/// </summary>
/// <param name="applicationUri">The application uri to use as base</param>
/// <param name="query">The query string that may be relative path starting with slash or absolute uri</param>
/// <param name="uri">The uri in case it was relative path or absolute uri</param>
/// <param name="absolute">Returns true if the uri was absolute uri</param>