Here's what I promise you:
Here's how to get it:
#!/usr/bin/env deno run --allow-net --allow-env --allow-read --allow-write --unstable | |
import { getToken } from "npm:github-app-installation-token"; | |
const privateKeyPath = prompt( | |
"Please enter filename of your private key, like `./your.app.private-key.pem`:" | |
); | |
console.log("privateKeyPath", privateKeyPath); | |
const privateKey = await Deno.readTextFile(privateKeyPath); | |
console.log(privateKey); |
javascript:(function(){var a=document.createElement('style'),b;document.head.appendChild(a);b=a.sheet;b.insertRule('*{outline: green solid 1px !important;background: rgb(0 100 0 / 0.1) !important;}',0);})() |
By using ReturnType
we don't have to manually write ContextType
See React gist for more examples https://gist.github.com/JLarky/5a1642abd8741f2683a817f36dd48e78
And original tweet https://twitter.com/JLarky/status/1554157252856033280
So here we have an example:
// updating state in React
count === 0; // true
setCount(count + 1);
console.log(count, doubleCount, el.textContent); // 0, 0, 0
/*️⃣ this is a valid JS comment thanks to https://discord.com/channels/722131463138705510/730114401427783713/991082758749192262 */ | |
// $ curl https://unpkg.com/emoji.json@13.1.0/emoji.json > emoji.json | |
// $ deno run -A --watch script.ts | |
const decoder = new TextDecoder("utf-8"); | |
const data = await Deno.readFile("emoji.json"); | |
const emojis: any[] = JSON.parse(decoder.decode(data)); | |
emojis.forEach((e) => { | |
if (e.char.split("")[0] === "*") { |
/** | |
* @type {import('prettier').Options} | |
*/ | |
module.exports = { | |
plugins: [require.resolve('prettier-plugin-astro')], | |
overrides: [ | |
{ | |
files: '**/*.astro', | |
options: { parser: 'astro' } |
<script> | |
window.onload = function () { | |
setTimeout(function () { | |
const rootElement = document.getElementById("root2"); | |
if (rootElement.childElementCount === 0) { | |
rootElement.innerHTML = | |
"<h1 class='m-4 fog:text-header2'>Failed to load page.</h1><p class='ml-4'>Please try one more time; if it still doesn't work, email <a class='fog:text-link' href='mailto:support@fogbender.com'>support@fogbender.com</a>.</p>"; | |
console.error("Failed to load page."); | |
} | |
}, 3000); |
function isEmail(email: string) { | |
const el = document.createElement('input'); | |
el.value = email; | |
el.type = 'email'; | |
return el.validity.valid; | |
} |
import { createNewFogbender } from "fogbender"; | |
import { | |
FogbenderConfig, | |
FogbenderFloatingWidget, | |
FogbenderHeadlessWidget, | |
FogbenderIsConfigured, | |
FogbenderProvider, | |
FogbenderWidget, | |
} from "fogbender-react"; |