Skip to content

Instantly share code, notes, and snippets.

@mbcrawfo
mbcrawfo / dotnet-ef.sh
Last active May 18, 2024 17:02
Helper script for the dotnet ef CLI
#!/bin/bash
# This script helps provide project specific options to the dotnet ef cli.
if [ $# -eq 0 ]; then
echo "Usage: ./dotnet-ef.sh <command> [options]"
exit 1
fi
args=(
@1forh
1forh / index.html
Last active July 3, 2024 14:24
Prevent map zoom on scroll
<div id="map-wrapper">
<iframe id="map-canvas"></iframe>
</div>
@paulirish
paulirish / what-forces-layout.md
Last active July 22, 2024 06:32
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@terrancesnyder
terrancesnyder / regex-japanese.txt
Created November 7, 2011 14:05
Regex for Japanese
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([一-龯])
Regex for matching Hirgana or Katakana
([ぁ-んァ-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-んァ-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)