Skip to content

Instantly share code, notes, and snippets.

Avatar

Brad Dean TrueGeek

View GitHub Profile
@TrueGeek
TrueGeek / ServerTlsSettings.cs
Created Dec 23, 2019
Custom TlsHandler for DotNetty. This is needed when using Matrix vNext with Xamarin. From https://github.com/Azure/DotNetty/pull/374
View ServerTlsSettings.cs
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace CustomMonoTlsHandler
{
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
using DotNetty.Handlers.Tls;
public sealed class ServerTlsSettings : TlsSettings
View CustomTlsHandler.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.IO;
using System.Net.Security;
using System.Runtime.ExceptionServices;
using System.Security.Cryptography.X509Certificates;
using System.Threading;
using System.Threading.Tasks;
@TrueGeek
TrueGeek / BindableScrollableStackLayout.xaml
Created Jun 3, 2019
Xamarin Forms Bindable Scrollable StackLayout
View BindableScrollableStackLayout.xaml
<?xml version="1.0" encoding="UTF-8"?>
<ScrollView
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Project.Controls.BindableScrollableStackLayout">
<StackLayout x:Name="stackLayout" />
</ScrollView>
@TrueGeek
TrueGeek / lambda.dynamodb.get.js
Created Jan 11, 2019
AWS Lambda DynamoDB PUT
View lambda.dynamodb.get.js
var AWS = require('aws-sdk');
var dynamodb = new AWS.DynamoDB.DocumentClient();
exports.handler = (event, context, callback) => {
dynamodb.scan({
TableName: 'ggmug'
}, (err, data) => {
if (err) {
@TrueGeek
TrueGeek / lambda.dynamodb.put.js
Created Jan 11, 2019
AWS Lambda DynamoDB PUT
View lambda.dynamodb.put.js
var AWS = require('aws-sdk');
var dynamodb = new AWS.DynamoDB.DocumentClient();
exports.handler = (event, context, callback) => {
console.log(JSON.stringify(event));
dynamodb.put({
TableName: 'ggmug',
Item: {