Note
Make sure docker-compose is installed
bashmkdir -p ~/freshrss
cd ~/freshrss| #!/bin/bash | |
| # Fetch the JSON data and parse it with jq to create markdown links | |
| response=$(curl -s "https://feeds.stevedylan.dev?format=json" | \ | |
| jq -r '.subscriptions[] | "- [\(.title)](\(.htmlUrl))"' | \ | |
| sort) | |
| # Copy to clipboard (works on macOS, Linux with xclip, or Linux with xsel) | |
| if command -v pbcopy &> /dev/null; then | |
| # macOS |
| import { XMLParser } from 'fast-xml-parser'; | |
| interface OutlineItem { | |
| text: string; | |
| title?: string; | |
| htmlUrl?: string; | |
| xmlUrl?: string; | |
| } | |
| function parseOpml(opmlContent: string): OutlineItem[] { |
| #!/bin/bash | |
| # Script to check for vulnerable npm packages from supply chain attack | |
| # | |
| # To use simply copy and paste the contents into a file like `scan.sh` then run `bash scan.sh` in your project's root directory | |
| echo "🔍 Checking for vulnerable npm packages..." | |
| echo "=============================================" | |
| # Define the vulnerable packages and versions |
This guide is for those who might be using bhvr and want to deploy their Hono server to a Cloudflare worker. While it's relatively simple to setup I will be looking into how to automate it into the CLI setup.
server repo and update the server/tsconfig.json file.bun add @cloudflare/workers-types| function oatsesh | |
| set selected_session (oatmeal sessions list | awk '{print substr($0, index($0, "latest, ") + 8)}' | fzf) | |
| if test -n "$selected_session" | |
| set full_line (oatmeal sessions list | grep "$selected_session") | |
| set id_value (echo $full_line | grep -o '[a-f0-9]\{8\}-[a-f0-9]\{4\}' | head -n 1) | |
| if test -n "$id_value" | |
| oatmeal sessions open -i $id_value | |
| end |
| import { CID } from 'multiformats/cid' | |
| import * as raw from 'multiformats/codecs/raw' | |
| import { sha256 } from 'multiformats/hashes/sha2' | |
| const JWT = "YOUR_PINATA_JWT" | |
| async function main(){ | |
| try { | |
| const text = "Hello World!"; | |
| const blob = new Blob([text], { type: "text/plain" }); | |
| const unit8array = new Uint8Array(await blob.arrayBuffer()); |
| import { | |
| Message, | |
| NobleEd25519Signer, | |
| FarcasterNetwork, | |
| LinkBody, | |
| makeLinkAdd | |
| } from "@farcaster/core"; | |
| import { hexToBytes } from "@noble/hashes/utils"; | |
| const FID = process.env.FID ? parseInt(process.env.FID) : 0; |
| const { getSSLHubRpcClient, Message } = require("@farcaster/hub-nodejs"); | |
| async function doStuff() { | |
| try { | |
| const HUB_URL = "hub-grpc.pinata.cloud" | |
| const client = getSSLHubRpcClient(HUB_URL); | |
| const messageBytes = "0a5e080d10d72518ede2b52e200182014f0a3068747470733a2f2f70696e61746164726f70732e636f6d2f6170692f7369676e61747572652d76616c69646174696f6e10011a1908d725121400000000000000000000000000000000000000011214a4d95afb8cf3761b8dff60375c398f8a1407ea7418012240bc9d823ea9b025a7750bc60461ecb8d6ef656d89f3ed24564d7d86e4ad18974d8b9ccb14a3bd6886cbb7249aeecfed5edd156e35cb34123b8a6da3da6c93ed0228013220975eb342c8b39f185e569eab3cf509fbac0c8f6b51e487b1bba30af339dbb79b" | |
| const message = Message.decode(Buffer.from(messageBytes, 'hex')); | |
| const result = await client.validateMessage(message); | |
| console.log(result); | |
| } catch (err) { |
| import { getSSLHubRpcClient, Message } from "@farcaster/hub-nodejs"; | |
| const HUB_URL = "hub-grpc.pinata.cloud"; | |
| const client = getSSLHubRpcClient(HUB_URL); | |
| const frameMessage = Message.decode(Buffer.from(req.body?.trustedData?.messageBytes || '', 'hex')); | |
| const result = await client.validateMessage(frameMessage); | |
| if (result.isOk() && result.value.valid) |