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
// https://github.com/BuilderIO/builder/blob/21c96eff31434f51adc9ec3e6071256572cd261b/packages/sdks/src/blocks/embed/embed.lite.tsx | |
import { useEffect, useRef, useState } from 'react'; | |
export interface EmbedProps { | |
content: string; | |
} | |
const SCRIPT_MIME_TYPES = ['text/javascript', 'application/javascript', 'application/ecmascript']; | |
function isJsScript(script: HTMLScriptElement) { |
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
((raw)=>{let i = { 0: t => m(t), 1: t => a(t), 2: t => new RegExp(t), 3: t => new Date(t), 4: t => new Map(a(t)), 5: t => new Set(a(t)), 6: t => BigInt(t), 7: t => new URL(t), 8: t => new Uint8Array(t), 9: t => new Uint16Array(t), 10: t => new Uint32Array(t) } , o = t => { let[l,e] = t; return l in i ? i[l](e) : void 0 } , a = t => t.map(o) , m = t => typeof t != "object" || t === null ? t : Object.fromEntries(Object.entries(t).map( ([l,e]) => [l, o(e)])); return m(raw)})(JSON.parse($0.getAttribute('props'))) |
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
// https://x.com/JLarky/status/1826404005876301882 | |
export function FancyStuff(props: { getFromServer?: undefined | (() => string) }) { | |
const [mousePos, setMousePos] = useState('0, 0'); | |
useEffect(() => { | |
document.addEventListener('mousemove', (e) => { | |
setMousePos(`${e.clientX}, ${e.clientY}`); | |
}); | |
}, []); | |
return ( |
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
#!/bin/sh | |
/*/.this-doesnt-exist 2>/dev/null | |
## Please do not edit this part of the script, this is a loader created by "npx bun-self" | |
if ! [ -x "$(command -v bun)" ]; then | |
## it's possible that bun is installed but not in the PATH, let's check if BUN_INSTALL is set | |
if [ -z "$BUN_INSTALL" ]; then | |
export BUN_INSTALL="$HOME/.bun" | |
export PATH="$BUN_INSTALL/bin:$PATH" | |
fi |
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
<div | |
class="builder-component builder-component-b86c37dbf5a74f00b1140749e979b128_e3b7b83ba76d4b1b859cda06103cf240" | |
data-name="global-nav" | |
data-source="Rendered by Builder.io" | |
> | |
<template | |
data-template-variant-id="63f38278c320405da7a63b8d358c1172" | |
><div | |
class="builder-content" | |
builder-content-id="63f38278c320405da7a63b8d358c1172" |
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
// @ts-check | |
function runOnSchedule() { | |
declineEventsForDate(); | |
} | |
function declineEventsForDate() { | |
var calendar = CalendarApp.getDefaultCalendar(); // Gets your default calendar | |
var now = new Date(); | |
var sevenDaysFromNow = new Date(now.getTime() + 7 * 24 * 60 * 60 * 1000); |
curl https://gist.githubusercontent.com/JLarky/4317558672148b2446861f8bb56c4f03/raw/4f6f3cd346cdcdf176ac1ac86b1049f503f6a4e5/script.ts > script.ts
bash script.ts
How to use environment variables in Remix, tiny version, see full version:
NewerOlder