Skip to content

Instantly share code, notes, and snippets.

@salarcode
salarcode / BluetoothPermissions.Android.cs
Last active April 17, 2024 00:00
MAUI Bluetooth Permission Declaration (for Android)
// IMPORTANT: Put this file in `Platforms/Android/` directory.
using Microsoft.Maui.ApplicationModel;
using System.Collections.Generic;
/// <summary>
/// MAUI Bluetooth Permission Decleration (for Android).
/// </summary>
/// <remarks>
/// IMPORTANT: Put this file in `Platforms/Android/` directory.
/// </remarks>
@salarcode
salarcode / click-counter.html
Created August 30, 2020 05:31
Click Counter. Has increase/decrease buttons as well as reset. Has history and vibrates phone.
<!DOCTYPE html>
<html>
<head>
<title>Click Counter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: "Segoe UI";
}
@salarcode
salarcode / LoopIncrements.cs
Created November 7, 2019 23:47
pre-increment vs. post-increment
/// <summary>
/// pre-increment vs. post-increment
/// </summary>
/// <url>
/// https://medium.com/better-programming/stop-using-i-in-your-loops-1f906520d548
/// </url>
public class LoopIncrements
{
public int Repeat = 1_000_000;