This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// usage | |
// in main: | |
// import { checkForUpdates } from './updater' | |
// app.whenReady().then(() => { | |
// ... | |
// checkForUpdates() | |
// createWindow() | |
// ... | |
// } | |
// you may need to adjust the getMainWindow function depending on your app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.from(document.styleSheets).filter((sheet) => { try { sheet.cssRules; return true; } catch (err) { console.log(`Due to CORS issues, this script can't access "${sheet.href}"`); return false; }}).map((sheet) => Array.from(sheet.cssRules).map((rule) => rule.type === rule.FONT_FACE_RULE ? rule.cssText : rule.type === rule.STYLE_RULE ? Array.from(document.querySelectorAll(rule.selectorText)).some((node) => node.getBoundingClientRect().top < window.innerHeight && window.getComputedStyle(node).display !== 'none') ? rule.cssText : null : rule.type === rule.MEDIA_RULE ? `@media ${rule.conditionText} {${Array.from(rule.cssRules).map((mediaRule) => mediaRule.type === mediaRule.FONT_FACE_RULE ? mediaRule.cssText : mediaRule.type === mediaRule.STYLE_RULE ? Array.from(document.querySelectorAll(mediaRule.selectorText)).some((node) => node.getBoundingClientRect().top < window.innerHeight && window.getComputedStyle(node).display !== 'none') ? mediaRule.cssText : null : null).filter((mediaRule) => mediaRule != null).join( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
const path = require("path"); | |
const sharp = require("sharp"); | |
const formats = ['avif', 'webp','jpg']; | |
const formatsQuality = [40, 50, 50]; | |
const myroot = process.env.ELEVENTY_ROOT; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# inspired by: https://forum.micropython.org/viewtopic.php?t=1938#p10931 | |
# | |
import micropython | |
try: | |
from machine import Timer | |
timer_init = lambda t, p, cb: t.init(period=p, callback=cb) | |
except ImportError: | |
from pyb import Timer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background-image: | |
linear-gradient(45deg, #ccc 25%, transparent 25%), | |
linear-gradient(135deg, #ccc 25%, transparent 25%), | |
linear-gradient(45deg, transparent 75%, #ccc 75%), | |
linear-gradient(135deg, transparent 75%, #ccc 75%); | |
background-size:25px 25px; /* Must be a square */ | |
background-position:0 0, 12.5px 0, 12.5px -12.5px, 0px 12.5px; /* Must be half of one side of the square */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:( | |
function(){ | |
if(document.body.contains(document.getElementById("mydiv"))){ | |
document.getElementById("mydiv").remove() | |
} | |
var myobj=[...document.querySelectorAll("img.FFVAD")].reverse(); | |
var mydiv=document.createElement("div"); | |
mydiv.id="mydiv"; | |
mydiv.style.cssText='position:fixed; z-index:99999; padding:10px; max-height:300px; overflow-y:auto;'; | |
document.body.insertBefore(mydiv,document.body.firstChild); |