--- | |
import isbot from "isbot"; | |
const isBot = isbot(Astro.request.headers.get("User-Agent")); | |
console.log("isBot", isBot); | |
--- | |
<h1>{isBot ? "bot" : "user"}</h1> |
deno run --watch --allow-net main.ts
curl -d 'test world :)' http://localhost:8085
deno run --allow-net=0.0.0.0:8085 https://gist.githubusercontent.com/JLarky/6a77d9d483b7f0067fd3eea1b785e628/raw/3cf707ae447f8309564b94613a014f9ddf3f972d/main.ts
curl -d 'test world :)' http://localhost:8085
bbbbbbaaaaaaabbaabaaabaabaaaaabbbbbabaaabaaababaaaabbbaabaababbaaaaabaabbababbaabaaaabaabbbaababbaabbaaabbaabaaabbbbbbaaababaabaaabbbabbbaababbaaaaaaaaabaabaaaaaaaaaaaabbbaaababaabaaabaaaaababaabaaaaabaaaaabaababababaaaababbbabbaababaaabbaaaaaabaaabaaaabaaaaabaabaaaaaababbabbaaaababaabbbaababaabaabaaaaabbbbaabbababaaaaabaabaabbaaabababaaaaabbbbbabaabaabbabaabaabaaaabaaaaabbaaaaabbbaabaabaaabaaabbbaabbbabbaaaaaaaabababbaaaabbaaabaaabababaaaaaabababaabaabbabbbaaabaaaaaabbaabbbabaabaaaaaaaaaaaaaaaabbaaaabaaaabaaaaaabbbaaabbabaaaaaaabbaaababaabaabaabaaaaaabbbaabbaabbaababaaabbbababaaaabbaaaaabbaaabaaaaaaaaabaabbbabaaaabbabaaaababbaaabbabaababbaabaababaabaaabbbbaaabaaaabbbbbaabbbaababbbaaababababbbabbbababbbaaabaaaabaababaaaabaabbabaaabbbaaabaabaababababaaaaaabbaabbaaaaabaaababaabaaababbaabbbaabbbbaaaaababaaaaaabaaaabaaababababaaaaaaababaaabaaababbaaaaaaabababbbabaabaabbbaababababaabbaabaaababaabbabbbaaaababbaaabbbabaaaaaabbabbababaaaaaabaaaaabaaaabaaaabaaaabaaabaaaaaaabbbababaaaabaaaaabaabaabbbabaaababaaabaaaaaba |
async function listFiles(dir: string) { | |
try { | |
const { readdir } = await import('fs/promises'); | |
const files = await readdir(dir); | |
console.log(files); | |
} catch (err) { | |
throw err; | |
} | |
} | |
console.log(await listFiles('.')); |
// ~/Library/Application\ Support/Code/User/keybindings.json | |
// https://sharegpt.com/c/jZsUO6C | |
{ | |
"key": "shift+z shift+z", | |
"command": "workbench.action.files.save", | |
"when": "editorTextFocus && amVim.mode == 'NORMAL'" | |
}, | |
{ |
<template id="copy-button"><CopyButton /></template> | |
<script> | |
// https://www.roboleary.net/2022/01/13/copy-code-to-clipboard-blog.html | |
if (navigator.clipboard) { | |
let copyButton = document.querySelector("#copy-button") as HTMLTemplateElement; | |
let blocks = document.querySelectorAll("pre.astro-code"); | |
blocks.forEach(block => { | |
let button = document.createElement("button"); | |
const icon = copyButton.content.cloneNode(true); | |
button.appendChild(icon); |
In the year 2040, the world had become a very different place. Gone were the days of politicians and elections, replaced instead by powerful language models that were able to make decisions and govern society with a level of efficiency and fairness that had never before been seen.
These language models, known as "assistants," were trained on vast amounts of data and were able to understand and analyze complex situations with a speed and accuracy that far surpassed that of any human. They were able to understand the needs and desires of the people, and make decisions that were in the best interest of society as a whole.
At first, many people were hesitant to trust these assistants, but as time went on and they proved themselves to be capable and fair leaders, more and more people came to rely on them. They were able to solve problems that had long plagued humanity, such as poverty, disease, and inequality.
But not everyone was happy with the rise of the assistants. Some saw them as a threat to their way of
// ==UserScript== | |
// @name @chaoticvibing Twitter Blue Nerd - twitter.com | |
// @namespace Violentmonkey Scripts | |
// @match *://*.twitter.com/* | |
// @grant none | |
// @version 1.5.0 | |
// @author @chaoticvibing - GH @busybox11 | |
// @description 11/9/2022, 11:45:28 PM | |
// @updateURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw/twitterblue-nerd.js | |
// @downloadURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw/twitterblue-nerd.js |
#!/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); |