Skip to content

Instantly share code, notes, and snippets.

View TrueGeek's full-sized avatar

Brad Dean TrueGeek

View GitHub Profile
@TrueGeek
TrueGeek / ServerTlsSettings.cs
Created December 23, 2019 02:10
Custom TlsHandler for DotNetty. This is needed when using Matrix vNext with Xamarin. From https://github.com/Azure/DotNetty/pull/374
// 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
@TrueGeek
TrueGeek / CustomTlsHandler.cs
Created July 8, 2019 01:33
Matrix CustomTls
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 June 3, 2019 15:13
Xamarin Forms Bindable Scrollable StackLayout
<?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 January 11, 2019 13:51
AWS Lambda DynamoDB PUT
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 January 11, 2019 13:51
AWS Lambda DynamoDB PUT
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: {