Skip to content

Instantly share code, notes, and snippets.

View LanceMcCarthy's full-sized avatar
💾
Bashing __(ง'̀-'́)ง__ bugs

Lance McCarthy LanceMcCarthy

💾
Bashing __(ง'̀-'́)ง__ bugs
View GitHub Profile
@LanceMcCarthy
LanceMcCarthy / MainWindow.xaml
Created August 4, 2021 18:19
A WPF control that stacks a TextBox and a TextBlock togetther
<Window x:Class="YourApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:YourApp"
Title="MainWindow" Height="350" Width="525">
<Grid>
<local:TextSandwichControl Text="I'm in the textbox"
HeaderText="I'm the label"
Margin="10"/>
@LanceMcCarthy
LanceMcCarthy / Lance_McCarthy_Progress_public.asc
Created December 1, 2020 14:41
Lance McCarthy GPG Key Progress Software
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBF/BYpsBDACpvtR0aTeVY3jwc84YXkQSSpf+Ihe8Si9OQGOiVRkD3bx0PeLg
HsjP6R5MarxVpOb1QN4v0tFuXm4xn2RAqgRjScwII8meGVjYrhvcr2dBfEykFn44
WNErRwzfn6gg8DpHQe9y/kIx15CzeTJw+iDUppsyLd9jXVohEH01C6q/l+LpX2Y8
dgUw/7F9dP6S8N4GjyZ7OiG5Wo7Y2DZVqgJSfjU5tjQDNUgl/8jY59lI0MePJwoE
0b5wQapiSfy95t40b4AftSYYnyrhq9aX9cU7A2ojE3QUjfj5FWHja34C54gkuS7u
Pq9FgvGzW68BAJNL6ZAh0u8LnOSPyJlB7KsMjGWjAfnZKFHz68RogjfmO4Tdd5JQ
T5+3taV6ug8zmt3HDR/T1O/PSn1bn3KUlNqyTiYDsmiHecFFdTv9xFrUuZCDSXWc
TW2QzhVYvImhh0B2l9/+Ke9qjNtYjVm/r7MPQ/GJEjwiHFfflbLHIbSua6mHTPqN
@LanceMcCarthy
LanceMcCarthy / App.xaml
Last active August 28, 2020 21:23
Lance Uno and Telerik app.xaml
<Application
x:Class="UnoTester.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UnoTester"
xmlns:controls="using:Telerik.UI.Xaml.Controls">
<Application.Resources>
<ResourceDictionary>
@LanceMcCarthy
LanceMcCarthy / publickey.dvluper@protonmail.com.asc
Last active August 24, 2020 17:01
ProtonMail Public Key Block
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP.js v4.10.7
Comment: https://openpgpjs.org
xsBNBF86jgoBCAC1/Im2RowZhvTar/iP73DXcmOdV7hT6DWFZIAhHoGz9liV
jJwZktuD/oD4JGQDG6Yq3DsBfqCeY/FBj/I9ZHjxi4pXO08EPjSfw28ChSwo
yoxt4eRDrUGrHPGxt4x+tzNxBIqgBUjVrBsU58DQhUuZnBB2DLNspKkoFZwx
coVG8hCnhZ8nhsabPFwrkZZ6n+qMJsG0QD9bXamCg82k+XWomMZLkhYlUnvy
s5I0sP+GQPUpeIjXVt3lMQ2Ix/DYQpMw8P2SuKBUSI6UU97n5UoRkwImJjbg
8poDR3o536vqEwUXKgfbewfPgUD5Sj4H2qUhvIbFFPIvTsWrcIRQxsxHABEB
@LanceMcCarthy
LanceMcCarthy / CredentialsHelper.cs
Created August 23, 2020 16:28
Modern Password Salt and Ecryptor
using System;
using System.Linq;
using System.Security.Cryptography;
using Microsoft.AspNetCore.Cryptography.KeyDerivation;
namespace PwdTools
{
/* =======================
* HASHED PASSWORD FORMATS
* =======================
@LanceMcCarthy
LanceMcCarthy / Failed.txt
Created June 28, 2020 14:27
OMV UDEV Rules Update Output
root@omvpi:/home/pi# udevadm test /sys/block/sdb
This program is for debugging only, it does not run any program
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.
Load module index
Skipping empty file: /etc/systemd/network/99-default.link
Parsed configuration file /run/systemd/network/10-netplan-eth0.link
Created link configuration context.
Reading rules file: /lib/udev/rules.d/01-md-raid-creating.rules

Keybase proof

I hereby claim:

  • I am lancemccarthy on github.
  • I am dvluper (https://keybase.io/dvluper) on keybase.
  • I have a public key ASA1QiBTnifxGUFSWRI0tNol-Oq1wcSuXbXZ57q1zdU0Ywo

To claim this, I am signing this object:

@LanceMcCarthy
LanceMcCarthy / FileExtensions.cs
Last active March 23, 2020 00:52
XamarinForms NET Standard 2.0
public static class FileExtensions
{
private static readonly string LocalFolder;
static FileExtensions()
{
// Gets the target platform's valid save location
LocalFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
}
@LanceMcCarthy
LanceMcCarthy / MainPage.xaml
Last active January 30, 2020 21:27
Http POST using C++
<Page x:Class="FacePostProject.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<StackPanel VerticalAlignment="Center"
@LanceMcCarthy
LanceMcCarthy / MainPage.xaml
Created December 27, 2019 22:25
RadImageEditor with Remove BG API Tool
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:ie="clr-namespace:Telerik.XamarinForms.ImageEditor;assembly=Telerik.XamarinForms.ImageEditor"
x:Class="ImageEditorTools.Portable.MainPage"
BackgroundColor="LightGray">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />