Skip to content

Instantly share code, notes, and snippets.

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

Jean-Marie Alfonsi roubachof

🏠
Working from home
View GitHub Profile
@roubachof
roubachof / App.cs
Last active October 16, 2015 11:55
My IocProvider issues with custom implementation
using Cirrious.CrossCore;
using Cirrious.CrossCore.IoC;
using Cirrious.MvvmCross.ViewModels;
using MvvmCross.Plugins.Messenger;
using %COMPANYNAME%.Core.Services;
using %COMPANYNAME%.Core.Services.Impl;
namespace %COMPANYNAME%.Core
@roubachof
roubachof / MyTcpListener.cs
Last active March 4, 2021 17:32
TcpListener for Xamarin CI (listen to xml test reports)
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using Mono.Options;
namespace Stago.Mhp.Instr.Pocm.UnitTests.Droid.Server
{
@roubachof
roubachof / xamarin-ci.ps1
Last active June 28, 2016 11:41
Continuous Integration with Xamarin: launch emulator, copy apk, launch activity, retrieve test results as xml.
#
# Notes:
#
# - 10/06/16
# - the script attempts to connect to the first active Android emulator
# found in the list returned by the "adb devices" command, and launches it, if this list is empty.
# In this case, the AVD launched is the first .ini file found in the directory.
#
@roubachof
roubachof / AddTo-SystemPath.ps1
Last active March 17, 2016 14:52
Powershell function to add path to env path
Function AddTo-SystemPath {
Param([array]$PathToAdd)
$VerifiedPathsToAdd = $Null
Foreach($Path in $PathToAdd) {
if($env:Path -like "*$Path*") {
Write-Host "$Path already exists in Path statement"
} else {
$VerifiedPathsToAdd += ";$Path"
Write-Host "`$Path will be added to the environment path"
@roubachof
roubachof / AutoSign.cs
Last active March 29, 2016 08:35
Signing dll from nuget packages
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
namespace Autosign
{
public static class ProcessUtil
{
public static void Execute(string exePath, string arguments)
@roubachof
roubachof / TcpListenerLogServer.cs
Last active June 28, 2016 11:43
Script and tcp server listening to log results with NUnit.Xamarin 3 with TcpWriterParameters option (https://github.com/nunit/nunit.xamarin)
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using Mono.Options;
namespace Company.Whatever.UnitTests.Droid.Server
{
@roubachof
roubachof / App.cs
Last active April 13, 2016 08:03
MvxForms MasterDetail
using MvvmCross.Forms.Presenter.Core;
using Stago.Mhp.Instr.Pocm.Core.Views;
using Xamarin.Forms;
namespace Stago.Mhp.Instr.Pocm.Core
{
public partial class App : MvxFormsApp
{
public App()
@roubachof
roubachof / AnchorBottomSheetBehavior.DragCallback.cs
Last active May 12, 2019 19:07
Xamarin Android - Google maps bottom sheet behavior, a BottomSheetBehavior with an added state - Xamarin port of google BottomSheetStyle
using System;
using Android.Support.V4.View;
using Android.Support.V4.Widget;
using Android.Views;
using Debug = System.Diagnostics.Debug;
namespace SillyCompany
{
public enum AnchorBottomSheetState
@roubachof
roubachof / Paginator.cs
Last active September 15, 2019 06:32
Standalone version of the Sharpnado.Presentation.Forms paginator (it has no dependencies). It is totally crossplatform.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
namespace Sharpnado.Presentation.Paging
{
/// <summary>
/// Interface IInfiniteListLoader.
@roubachof
roubachof / Settings.XamlStyler
Last active February 6, 2020 14:49
XamlStyler json config file supporting all the `Xamarin.Forms` attributes for all my projects and decided to share it with you. So you won't start from nothing :)
{
"AttributesTolerance": 2,
"KeepFirstAttributeOnSameLine": true,
"MaxAttributeCharactersPerLine": 0,
"MaxAttributesPerLine": 1,
"NewlineExemptionElements": "RadialGradientBrush, GradientStop, LinearGradientBrush, ScaleTransfom, SkewTransform, RotateTransform, TranslateTransform, Trigger, Condition, Setter",
"SeparateByGroups": false,
"AttributeIndentation": 0,
"AttributeIndentationStyle": 1,
"RemoveDesignTimeReferences": false,