Discover gists
# ██████╗ ███████╗███╗ ███╗ ██████╗ ██╗ ██╗███████╗ ██╗ ██╗██████╗ | |
# ██╔══██╗██╔════╝████╗ ████║██╔═══██╗██║ ██║██╔════╝ ██║ ██║██╔══██╗ | |
# ██████╔╝█████╗ ██╔████╔██║██║ ██║██║ ██║█████╗ ███████║██████╔╝ | |
# ██╔══██╗██╔══╝ ██║╚██╔╝██║██║ ██║╚██╗ ██╔╝██╔══╝ ██╔══██║██╔═══╝ | |
# ██║ ██║███████╗██║ ╚═╝ ██║╚██████╔╝ ╚████╔╝ ███████╗ ██║ ██║██║ | |
# ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═══╝ ╚══════╝ ╚═╝ ╚═╝╚═╝ | |
# | |
# ██████╗ ██╗ ██████╗ █████╗ ████████╗██╗ ██╗ █████╗ ██████╗ ███████╗ | |
# ██╔══██╗██║ ██╔═══██╗██╔══██╗╚══██╔══╝██║ ██║██╔══██╗██╔══██╗██╔════╝ | |
# ██████╔╝██║ ██║ ██║███████║ ██║ ██║ █╗ ██║███████║██████╔╝█████╗ |
See how a minor change to your commit message style can make a difference.
ℹ️ git-conventional-commits A CLI util to ensure this conventions and generate changelogs
If you don't want to deal with styling a mostly text-based HTML document, plop these lines in and it'll look good:
html {
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
font-size: 1.3em;
max-width: 40rem;
padding: 2rem;
margin: auto;
line-height: 1.5rem;
# No Power Wasted 2500 V0.21 | |
# ESPHome Software für alle gängigen Versionen des Balkonspeichers xy2500. | |
# Diese Version ist speziell für Verwendung mit dem Home Assistant ausgelegt und | |
# inkludiert die Kommunikation mit diesem, Regelung für Nulleinspeisung | |
# und in Zukunft einiges mehr. | |
# Die Kommunikation mit dem Balkonspeichers xy2500 basiert auf der Arbeit von noone2K. | |
# Die Hauptseite für neue Entwicklungen, Integration MQTT, openhab usw. findet ihr unter: | |
# https://gist.github.com/noone2k/2ddea4c9bf116aaaefb8626b064d9a41 | |
# | |
# Mögen euch die Bits gnädig sein, |
Here is an updated list of the colors that are currently implemented with a name.
To using colors on discord.js, this is a typedef Colors, Colors.Aqua
to get the Aqua color.
Name | Int value | Hex Code |
---|---|---|
Default |
0 | #000000 |
Aqua |
1752220 | #1ABC9C |
DarkAqua |
1146986 | #11806A |
Green |
5763719 | #57F287 |
DarkGreen |
2067276 | #1F8B4C |
These keys have been tested to work. These are a combination of keys from Chinese websites, trial keys inside ISO's, auto-activate keys in OEM ISO's, and directly from Microsoft's website, all aggregated for your convenience.
In order to use these keys, you need the right edition of Windows XP/2003. Not just Home/Pro/Enteprise/etc, whether it's a Retail, OEM or Volume version. There's a clear cut way to check this.
// 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; // ¯\\_(ツ)_/¯ |
If you've written any kind of validation on user input, like onkeypress
then you'll know that sometimes you want to throttle the amount of times your function runs. A good example of this is Ajax based username validation - you don't want to hit the server on every key press, because most users will be able to write their name in around 1/10th of a second, so you should throttle the ajax request until the input is dormant for 100ms.
So with a bit of magic JavaScript making use of the ever useful closure JavaScript offers, we can create a simple method to handle this for us:
function debounce(fn, delay) {
var timer = null;
return function () {
var context = this, args = arguments;
clearTimeout(timer);
timer = setTimeout(function () {