Skip to content

Instantly share code, notes, and snippets.

@thongdoan
thongdoan / self-signed-certificate-with-custom-ca.md
Created March 21, 2019 02:32 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@thongdoan
thongdoan / CameraBridgeViewBase.java
Created November 16, 2018 03:49
CameraBridgeViewBase.java OpenCv_3.1.0, Fix orientation
package org.opencv.android;
import java.util.List;
import org.opencv.R;
import org.opencv.core.Mat;
import org.opencv.core.Size;
import android.app.Activity;
import android.app.AlertDialog;
@thongdoan
thongdoan / StatementBuilder.cs
Last active June 14, 2017 18:09
Sqlite.Net Delete, Update, Insert helper
//Thanks to https://github.com/praeclarum/sqlite-net
public static class SQLiteExtension
{
public static StatementBuilder<T> CreateStatement<T>(this SQLiteConnection conn)
{
return new StatementBuilder<T>(conn);
}
}
@thongdoan
thongdoan / Example.cs
Last active August 9, 2016 10:14
Xamarin Form Fluent Binding
namespace Examples
{
public class LoginView
{
private Entry _txtUserName;
private Entry _txtPassword;
private Button _btnLogin;
public LoginView ()
{
using System.IO;
using MvvmCross.Plugins.Sqlite;
using SQLite.Net.Interop;
using SQLite.Net.Platform.WindowsPhone8;
namespace Example {
public class WP8SqliteConnectionFactory : MvxSqliteConnectionFactoryBase {
public override ISQLitePlatform CurrentPlattform => new SQLitePlatformWP8();
public override string GetPlattformDatabasePath(string databaseName) {
using System;
using System.Threading;
using Android.Content;
using Android.Locations;
using Android.OS;
using Cirrious.CrossCore;
using Cirrious.CrossCore.Droid;
using Cirrious.CrossCore.Droid.Platform;
using Cirrious.CrossCore.Exceptions;
using Cirrious.CrossCore.Platform;