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
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 |
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
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()); |
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
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; |
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
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) { |
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
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) |
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
async function uploadJsonToPinata(jsonData, pinataApiKey) { | |
const axios = require("axios"); | |
const FormData = require("form-data"); | |
const url = "https://api.pinata.cloud/pinning/pinJSONToIPFS"; | |
try { | |
const data = JSON.stringify(jsonData); | |
const response = await axios.post(url, data, { |
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
__zoxide_zi () { | |
\builtin local result | |
result="$(\command zoxide query --interactive -- "$@")" && __zoxide_cd "${result}" | |
} |
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
keycode range supported by kernel: 1 - 255 | |
max number of actions bindable to a key: 256 | |
number of keymaps in actual use: 7 | |
of which 0 dynamically allocated | |
ranges of action codes supported by kernel: | |
number of function keys supported by kernel: 256 | |
max nr of compose definitions: 256 | |
nr of compose definitions in actual use: 68 | |
Symbols recognized by dumpkeys: | |
(numeric value, symbol) |
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
// Run `npm install form-data node-fetch fs dotenv` | |
// | |
// Create a separate .env file with the following variables completed | |
// PINATA_JWT= | |
// CROSSMINT_PROJECT_ID= | |
// CROSSMING_CLIENT_SECRET= | |
// | |
// Read more on how this works at | |
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
{ | |
"editor.accessibilitySupport": "off", | |
"terminal.integrated.fontFamily": "BerkeleyMono Nerd Font", | |
"workbench.colorTheme": "Gruvbox Material Dark", | |
"editor.fontFamily": "BerkeleyMono Nerd Font, Menlo, Monaco, 'Courier New', monospace", | |
"gruvboxMaterial.darkContrast": "hard", | |
"editor.inlineSuggest.enabled": true, | |
"editor.fontSize": 13, | |
"terminal.external.osxExec": "Alacritty.app", | |
"terminal.integrated.fontSize": 13, |
NewerOlder