Skip to content

Instantly share code, notes, and snippets.

View Hooterr's full-sized avatar

Maksymilian Lach Hooterr

View GitHub Profile
@OrionReed
OrionReed / dom3d.js
Last active July 16, 2024 05:35
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@rhishikeshj
rhishikeshj / ExtendedEntry.cs
Created May 3, 2017 08:55
How to debounce an Entry control in Xamarin
private Task _debounceTask;
public ExtendedEntry()
{
int debounceDelay = 500;
CancellationTokenSource _debounceTaskCancellationSource = null;
TextChanged += (sender, e) =>
{
if (_debounceTask != null)
{
@JonDouglas
JonDouglas / xamarinandroidbindings.md
Last active July 4, 2024 09:54
Xamarin Android Bindings Troubleshooting

Approaching a Xamarin.Android Bindings Case

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Binding is to first ensure you have the proper tooling available:

@DanDiplo
DanDiplo / JS-LINQ.js
Last active July 16, 2024 23:49
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },