THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
/** | |
* Polyfill for the vw, vh, vm units | |
* Requires StyleFix from -prefix-free http://leaverou.github.com/prefixfree/ | |
* @author Lea Verou | |
*/ | |
(function() { | |
if(!window.StyleFix) { | |
return; |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
function OnBlurComponent({ onBlur }) { | |
const handleBlur = (e) => { | |
const currentTarget = e.currentTarget; | |
// Check the newly focused element in the next tick of the event loop | |
setTimeout(() => { | |
// Check if the new activeElement is a child of the original container | |
if (!currentTarget.contains(document.activeElement)) { | |
// You can invoke a callback or add custom logic here | |
onBlur(); |
NOTE: a more up-to-date version of this can be found on my blog
A few days ago, version 1.9 of the Nix package manager was released. From the release notes:
nix-shell can now be used as a #!-interpreter. This allows you to write scripts that dynamically fetch their own dependencies.
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.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
#!/usr/bin/env python3 | |
# | |
# THIS SCRIPT REQUIRES PYTHON 3 | |
# | |
# Install requirements via: | |
# pip3 install docopt pillow reportlab | |
# | |
# Dedicated to the public domain where possible. | |
# See: https://creativecommons.org/publicdomain/zero/1.0/ | |
""" |
#!/usr/bin/env python3 | |
import sys | |
import json | |
import os | |
import os.path | |
import shutil | |
import logging | |
import tempfile | |
import glob | |
import argparse |
(defun vulpea-project-p () | |
"Return non-nil if current buffer has any todo entry. | |
TODO entries marked as done are ignored, meaning the this | |
function returns nil if current buffer contains only completed | |
tasks." | |
(seq-find ; (3) | |
(lambda (type) | |
(eq type 'todo)) | |
(org-element-map ; (2) |
Should help with avoiding errors like:
No version of Cypress is installed in: /home/rkb/.cache/Cypress/6.2.1/Cypress
Please reinstall Cypress by running: cypress install
----------
Cypress executable not found at: /home/rkb/.cache/Cypress/6.2.1/Cypress/Cypress