Skip to content

Instantly share code, notes, and snippets.

View DamianSuess's full-sized avatar
👍
Enjoying every day

Damian DamianSuess

👍
Enjoying every day
View GitHub Profile
@derv82
derv82 / Kai32.bas
Created February 12, 2013 08:03
VB6 module for "interacting" with America Online (AOL). Developed between 1998-2000 when I was 15.
Attribute VB_Name = "Kai32"
'-=====================================================-
' -= +------------------------------------------------+ =-
' -= | |\ =-
' -= | |¯¯|\ |¯¯|\ |¯¯|\ |¯¯¯¯¯¯|\ |¯¯¯¯¯¯|\ |\\ =-
' -= | | |\/ /\| |__|\||__|| |\||___ |\| |\\| =-
' -= | | |/ /\/ |¯¯¯¯¯|\ \\\\| \\|¯ |\| /¯¯___/\| |\\| =-
' -= | | /\/ | |\||¯¯|\ |¯¯|| |\|| ¯¯¯|\ |\\| =-
' -= | | \/ | | |\|| |\||______|\||______|\| |\\| =-
' -= | | |\ \ | |\|| |\| \\\\\\\\| \\\\\\\\| |\\| =-
@yetanotherchris
yetanotherchris / gist:4960171
Last active September 26, 2022 02:04
Double Linked List C# example
public static void Main()
{
DoubleLinkedList list = new DoubleLinkedList();
list.Insert("1");
list.Insert("2");
list.Insert("3");
DoubleLink link4 = list.Insert("4");
list.Insert("5");
Console.WriteLine("List: " + list);
@salcode
salcode / .gitignore
Last active February 10, 2024 10:56
See https://salferrarello.com/wordpress-gitignore/ for the latest version of my WordPress .gitignore file
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
@brandonsimpson
brandonsimpson / osx_uninstall_mysql_install_mariadb_homebrew.md
Last active June 12, 2024 16:00
OSX How To: Uninstall native MySQL and install MariaDB via Homebrew

OSX How To: Uninstall native MySQL and install MariaDB via Homebrew

This is a short overview on how to completely remove any old mysql server installs in OSX and upgrade to MariaDB without conflicts. Things can get a bit weird when you have various old installs of MySQL server floating around, and utilizing homebrew to install and upgrade MariaDB as a drop in replacement for MySQL has worked well, especially if you're used to managing MySQL installs via yum in linux.

First: Backup Your Data!

Backup all of your current databases with mysqldump

This isn't a tutorial on backups, and there are many ways to do it. You should know how to backup your data anyway. For this example, we'll do a full backup of our InnoDB databases.

@DamianSuess
DamianSuess / DroidTelephonySimInfo.cs
Last active January 28, 2022 22:02
Get Android's SIM ICC Id and device's IMEI number
// Requires the following permission in your AndroidManifest.xml
// <uses-permission android:name="android.permission.READ_PHONE_STATE" />
using System.Collections.Generic;
using Android.Telephony;
// ...
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
@DamianSuess
DamianSuess / Page.xaml
Created August 1, 2018 13:09
Xamarin.Forms - Password hide/show
<Entry x:Name="Email" Placeholder="Email" TextColor="Black" Grid.Row="1" Grid.Column="1"></Entry>
<StackLayout Grid.Row="2" Grid.Column="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Entry IsPassword="True" x:Name="Password" TextColor="Black" Placeholder="Password" Grid.Column="0" Grid.ColumnSpan="2" />
<Image Source="eye32.png" HorizontalOptions="End" VerticalOptions="Center" Grid.Column="1">
<Image.GestureRecognizers>
#include "Arduino.h"
#include "esp_camera.h"
#include "ESPAsyncWebServer.h"
typedef struct {
camera_fb_t * fb;
size_t index;
} camera_frame_t;
#define PART_BOUNDARY "123456789000000000000987654321"
@tianvan
tianvan / DialogHostRegionAdapter.cs
Last active September 12, 2024 06:50
Prism combine with Material Design Toolkit Dialog
namespace Core.Services.Dialog
{
public class DialogHostRegionAdapter : RegionAdapterBase<DialogHost>
{
public DialogHostRegionAdapter(IRegionBehaviorFactory regionBehaviorFactory) : base(regionBehaviorFactory)
{
}
protected override void Adapt(IRegion region, DialogHost regionTarget)
@dansiegel
dansiegel / EnumBindingSourceExtension.cs
Created August 18, 2020 18:59
Binding Enums in Xamarin.Forms
using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace AwesomeApp.Xaml
{
[ContentProperty(nameof(Type))]
public class EnumBindingSourceExtension : IMarkupExtension
{
public Type Type { get; set; }
@DamianSuess
DamianSuess / AwaitNonAsyncMethods.cs
Created March 25, 2021 22:00
Await in a Non-Async Method
// Sample 1 - Non-Helper Function Method
public bool HardReset()
{
return HardResetAsync().GetAwaiter().GetResult();
}
public async Task<bool> HardResetAsync()
{
// Real code goes here
await Task.Yield();