-
I had to install PlanetScale CLI following: https://planetscale.com/docs/concepts/planetscale-environment-setup
-
I logged in using
pscale auth
command:
$ pscale auth login
# this opened my browser where I was logged in on PlanetScale
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test Stun/Turn Servers</title> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
</head> |
chrome ??= browser; | |
function removeReels(node) { | |
if (!node) return; | |
const bannedInnerTexts = ["Reels and short videos", "Reels"]; | |
const text = node.querySelector?.(`div > span[dir="auto"]`)?.innerText ?? ""; | |
const matchedOnDesktop = bannedInnerTexts.find((t) => t === text); | |
const matchedOnMobile = bannedInnerTexts.includes( | |
node.querySelector("div > span")?.innerText, | |
); |
I had to install PlanetScale CLI following: https://planetscale.com/docs/concepts/planetscale-environment-setup
I logged in using pscale auth
command:
$ pscale auth login
# this opened my browser where I was logged in on PlanetScale
echo 'void async function() { const p = await Bun.file("package.json").json(); const out1 = Object.entries(p.dependencies).filter(([k,v]) => v === "latest").map(([k]) => k).reduce((acc, curr) => acc + " " +curr, "bun add"); const out2 = Object.entries(p.devDependencies).filter(([k,v]) => v === "latest").map(([k]) => k).reduce((acc, curr) => acc + " " +curr, "bun add -d"); console.log(`\n${out1}\n\n${out2}\n`) }()' > temp.js && bun run temp.js; rm temp.js |
#!/usr/bin/env python3 | |
import argparse | |
import glob | |
import os | |
import struct | |
import sys | |
from sentencepiece import SentencePieceProcessor | |
HPARAMS = keys = ["vocab_size", "dim", "multiple_of", "n_heads", "n_layers"] |
import * as React from "react"; | |
import { useState } from "react"; | |
import withCleanup from "./withCleanup"; | |
import withOnMount from "./withOnMount"; | |
let loaded = false; | |
function Counter() { | |
const [count, setCount] = useState(0); |
The first step is to use the Expo CLI to initialize the project. If you don't have the latest version of the Expo CLI tool, (or you don't have it installed) run npm install -g expo-cli
.
Now run the following commands in the same order:
expo init my-app -t expo-template-blank-typescript
npx install-peerdeps --dev eslint-config-airbnb
npm i --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin
npm i --save-dev prettier eslint-config-prettier eslint-plugin-prettier
Create or edit the file .eslintrc.json
with the following content:
const lockId = "PASTE_YOUR_LOCK_ID_HERE"; | |
function checkIfEmailSentAlready() { | |
const sheetId = "PASTE_YOUR_SPREADSHEET_ID_HERE"; | |
const sheet = SpreadsheetApp.openById(sheetId); | |
const columns = sheet | |
.getRange("A1:B1000") | |
.getValues() |
const a = [ | |
"", | |
"one ", | |
"two ", | |
"three ", | |
"four ", | |
"five ", | |
"six ", | |
"seven ", | |
"eight ", |
import { NextApiResponse } from "next"; | |
import LRU from "lru-cache"; | |
const rateLimit = (options: { | |
uniqueTokenPerInterval: number; | |
interval: number; | |
}) => { | |
const tokenCache = new LRU<string, number[]>({ | |
max: options.uniqueTokenPerInterval || 500, | |
maxAge: options.interval || 60000, |