Skip to content

Instantly share code, notes, and snippets.

@micah686
micah686 / dbCharactersView.xaml
Created Dec 4, 2020
TabChanged() keeps getting activated
View dbCharactersView.xaml
<UserControl x:Class="Manager.Views.UserControls.MainPage.db.dbCharactersView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:s="https://github.com/canton7/Stylet"
xmlns:adonisExtensions="clr-namespace:AdonisUI.Extensions;assembly=AdonisUI"
xmlns:vm="clr-namespace:Manager.ViewModels.UserControls.MainPage.db"
mc:Ignorable="d"
x:Name="CharUserControl"
View AbstractFilter.cs
/// <summary>
/// Generic class that implements majority of the IFilter interface
/// </summary>
/// <typeparam name="T"></typeparam>
public abstract class AbstractFilter<T> : IFilter
{
/// <summary>
/// The value of the filter
/// </summary>
/// <param name="value"></param>
@micah686
micah686 / App.xaml
Created Aug 1, 2020
Validation Error Table
View App.xaml
<Application x:Class="WpfApp3.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApp3"
xmlns:s="https://github.com/canton7/Stylet">
<Application.Resources>
<s:ApplicationLoader x:Key="ApplicationLoader">
<s:ApplicationLoader.Bootstrapper>
<local:Bootstrapper />
</s:ApplicationLoader.Bootstrapper>
@micah686
micah686 / TouchInput.md
Last active May 20, 2020
Touch Input Research
View TouchInput.md

Function used for testing button clicks

C#

private static Random random = new Random();
public static string RandomString(int length)
{
    const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    return new string(Enumerable.Repeat(chars, length)
      .Select(s => s[random.Next(s.Length)]).ToArray());
}
View hulublock.txt
ads.hulu.com
a.huluad.com
hulu.112.2o7.net
huludev.112.2o7.net
ll.a.hulu.com
t2.huluim.com
t-ak.hulu.com
track.hulu.com
tw.i.hulu.com
urlcheck.hulu.com
View OpenVPN Server.conf
dev tun
proto udp
port 1194
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/server_06UQCMlzLTtiWjQx.crt
key /etc/openvpn/easy-rsa/pki/private/server_06UQCMlzLTtiWjQx.key
dh none
topology subnet
server 10.8.0.0 255.255.255.0
# Set your primary domain name server address for clients
View Sample Nginx Config.conf
###### Local Only ######
## http://local.domain.com redirects to https://local.domain.com
server {
listen 80;
listen [::]:80;
server_name local.domain.com;
include /etc/nginx/snippets/letsencrypt.conf;
View Windows 10 Optimization Script.ps1
##########
# Win10 Optimization Script With Extra GPD Win Tweaks
# Adapted version of https://github.com/Disassembler0/Win10-Initial-Setup-Script by Disassembler <disassembler@dasm.cz>
# Author: BlackDragonBE
# Version: v2.2.1 (2017-12-02)
# Copied from https://www.reddit.com/r/gpdwin/comments/6ipa6c/windows_10_optimization_script_for_gpd_win/
##########
# As a workaround for disabled script execution, run this command (without #) in an elevated PowerShell windows first and choose "all" if you're asked where to apply this:
# Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
View VndbSharpThrottledResponse.log
get vnlist basic (uid=7887) {"page":1}
Get Response | results {"num":10,"more":true,"items":[{"added":1277677665,"vn":1,"notes":null,"status":2},{"added":1277675654,"vn":2,"status":2,"notes":null},{"added":1277680949,"vn":3,"notes":null,"status":3},{"notes":null,"status":2,"added":1277680444,"vn":7},{"status":2,"notes":null,"added":1277662062,"vn":9},{"notes":null,"status":1,"added":1277665730,"vn":11},{"status":0,"notes":null,"vn":13,"added":1384510296},{"vn":14,"added":1415510397,"status":0,"notes":null},{"added":1464267757,"vn":15,"notes":null,"status":0},{"vn":16,"added":1457958324,"status":0,"notes":null}]}
get vnlist basic (uid=7887) {"page":2}
Get Response | results {"num":10,"items":[{"added":1277665455,"vn":17,"notes":null,"status":2},{"added":1434982220,"vn":18,"notes":null,"status":0},{"added":1435063307,"vn":20,"status":0,"notes":null},{"added":1434982448,"vn":21,"status":0,"notes":null},{"notes":null,"status":2,"vn":24,"added":1277680877},{"added":1433410533,"vn":25,"status":0,"notes":null},{"a
View VndbConsole.cs
using System;
using System.Text;
using System.Threading.Tasks;
using VndbSharp;
using VndbSharp.Interfaces;
using VndbSharp.Models;
using VndbSharp.Models.Errors;
namespace VndbConsole
{