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
#!/usr/bin/env bun | |
import { $, BunFile, file } from "bun" | |
type CFBundleDocumentType = { | |
CFBundleTypeName: "Content" | |
CFBundleTypeRole: "QLGenerator" | |
LSItemContentTypes: ["public.data", "public.content", ...string[]] | |
LSTypeIsPackage: false | |
NSPersistentStoreTypeKey: "XML" |
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
/* | |
MIT No Attribution | |
Copyright 2024 Thomas Aylott | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
software and associated documentation files (the "Software"), to deal in the Software | |
without restriction, including without limitation the rights to use, copy, modify, | |
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so. |
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
/* eslint-disable @typescript-eslint/no-unused-vars */ | |
"use client" | |
import { Suspense, use, useMemo } from "react" | |
import { Text } from "react-native" | |
import { waitForTransactionReceipt } from "src/lib/viem" | |
import { PromisedValue } from "src/utils/type-helpers" | |
import { Address } from "viem" | |
type TransactionReceipt = PromisedValue<ReturnType<typeof waitForTransactionReceipt>> |
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
"use server" | |
import { $ } from "bun" | |
export async function* CurrentServerTime() { | |
while (true) { | |
yield <html.input key="ONLY ME!" readOnly value={await $`time`.text()} /> | |
await sleep(1_234) | |
} | |
} |
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/bash | |
set -e # exit on error | |
set -u # exit on undefined variable | |
# set -o pipefail # exit on failure in pipe | |
# set -x # print commands as they are run | |
# if DEBUG is set, print commands as they are run | |
set +u # allow undefined variables for this check | |
if [ ! -z "$DEBUG" ]; then | |
set -x |
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
class GenAI { | |
static INJECT = "<{([ INJECT ])}>" | |
static PRE = "<PRE>" | |
static SUF = " <SUF>" | |
static MID = " <MID>" | |
static END = " <EOT>" | |
#apiUrl | |
#model |
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
These TLDs are NOT linkified automatically by Apple Notes | |
example.ac | |
example.actor | |
example.adult | |
example.ae | |
example.am | |
example.app | |
example.archi | |
example.army |
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
def get_devices(needs: int = None): | |
"""Get devices that can be used by the pipeline | |
Parameters | |
---------- | |
needs : int, optional | |
Number of devices needed by the pipeline | |
Returns | |
------- |
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
#!/usr/bin/env python3 | |
import json | |
import os | |
def install(): | |
os.environ['PYPPETEER_CHROMIUM_REVISION'] = '1052357' | |
os.system('python3 -m pip install -q pyppeteer pyppeteer_stealth') | |
os.system('pyppeteer-install') |
NewerOlder