This is yet another explanation of why async
and return await
is pointless, coming from this post.
// async means that this:
const fn = async (...args) => {/* stuff */};
// is basically the equivalent of this:
const proxies = new WeakMap; | |
const hyphen = name => name.replace(/([a-z])([A-Z])/g, '$1-$2'); | |
const handler = { | |
get: (el, name) => el.getAttribute(hyphen(name)), | |
set: (el, name, value) => { | |
el.setAttribute(hyphen(name), value); | |
return true; | |
} | |
}; | |
const set = el => { |
This is yet another explanation of why async
and return await
is pointless, coming from this post.
// async means that this:
const fn = async (...args) => {/* stuff */};
// is basically the equivalent of this:
{ | |
"credit_card": { | |
"$id": "#/properties/credit_card", | |
"$comment": "Comment for developer", | |
"type": "string", | |
"title": "credit card number", | |
"description": "The number on the back of this credit card", | |
"examples": [ "4111 1111 1111 1111", "5500 0000 0000 0004" ], | |
"default": "4111 1111 1111 1111", | |
"minLength": 10, |
// just guessing | |
// converted: https://json-schema.org/draft/2019-09/links | |
export type JSONSchema7 = import('json-schema').JSONSchema7; | |
export type LinkDescriptionObject = { | |
anchor?: string; | |
anchorPointer?: string; | |
rel?: string | string[]; | |
href?: string; |
import SwiftUI | |
extension Calendar { | |
func generateDates( | |
inside interval: DateInterval, | |
matching components: DateComponents | |
) -> [Date] { | |
var dates: [Date] = [] | |
dates.append(interval.start) |
#!/bin/bash | |
# This file is designed to spin up a Wireguard VPN quickly and easily, | |
# including configuring Pi-Hole as a recursive local DNS server using | |
# Unbound to block ads a the DNS level | |
# | |
# Make sure to change the public/private keys before running the script | |
# Also change the IPs, IP ranges, and listening port if desired | |
# add wireguard repo | |
sudo add-apt-repository ppa:wireguard/wireguard -y |
#!/bin/bash | |
# This file is designed to spin up a Wireguard VPN quickly and easily, | |
# including configuring a recursive local DNS server using Unbound | |
# | |
# Make sure to change the public/private keys before running the script | |
# Also change the IPs, IP ranges, and listening port if desired | |
# iptables-persistent currently requires user input | |
# add wireguard repo | |
sudo add-apt-repository ppa:wireguard/wireguard -y |
Date.prototype.getUnixTime = function() { | |
return this.getTime()/1000|0; | |
}; | |
Date.prototype.getUnixMicroUnixTime = function() { | |
return this.getUnixTime()*1000000; | |
}; | |
var date = new Date(); | |
date.setMonth(date.getMonth() - 9); |
/* | |
* This is free and unencumbered software released into the public domain. | |
* | |
* For more information, please refer to <https://unlicense.org> | |
*/ | |
//Regular text | |
#define BLK "\e[0;30m" | |
#define RED "\e[0;31m" | |
#define GRN "\e[0;32m" |
var img = new Image(); | |
img.src = 'img/assets/background.png'; | |
var int = setInterval(function() { | |
if (img.complete) { | |
clearInterval(int); | |
document.getElementById('content').setAttribute('style', 'background-image: url(' + img.src + '); opacity:1;'); | |
} | |
}, 50); |