github.com/oneseco-media

github.com/oneseco-media

2527 bookmarks
Custom sorting
APIs — Firefox Source Docs documentation
APIs — Firefox Source Docs documentation
APIs Running the pipeline API You can use the Transformer.js pipeline API directly to perform inference, as long as the model is in our model hub. The Transformers.js documentation provides a lot of examples that you can slightly adapt when running in Firefox. In the example below, a text summarization task is performed using the summarization task: const { createEngine } = ChromeUtils.importESModule("chrome://global/content/ml/EngineProcess.sys.mjs"); const options = { taskName: "summarization", modelId: "mozilla/text_summarization", modelRevision: "main" }; const engine = await createEngine(options); const text = 'The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, ' + 'and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. ' + 'During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest ' + 'man-made structure in the world, a title it held for 41 years until the Chrysler Building in New ' + 'York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to ' + 'the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the ' + 'Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second ' + 'tallest free-standing structure in France after the Millau Viaduct.'; const request = { args: [text], options: { max_new_tokens: 100 } }; const res = await engine.run(request); console.log(res[0]["summary_text"]);
·firefox-source-docs.mozilla.org·
APIs — Firefox Source Docs documentation
Discord - Integrations - GitBook
Discord - Integrations - GitBook
Overview The GitBook Discord integration brings the power of GitBook to your Discord Server. Your members have instant access to your GitBook knowledge base, without leaving the app. How it works Get notified of what's important: Receive real-time Discord notifications when something important happens to your content on GitBook. For example, when your content is updated or published. Pick and choose what, where, and how you wish to be notified. Configure You can install the integration on a single space by clicking the integrations button in sub-navigation panel. If you prefer to install the Discord integration on multiple on all spaces you can enable this through organization settings. To configure the integration you will have to authorize the connection between Discord and GitBook. You can also select the default server to post messages to.
·app.gitbook.com·
Discord - Integrations - GitBook
Setup - ngrok
Setup - ngrok
ngrok is your app’s front door—a globally distributed reverse proxy that secures, protects and accelerates your applications and network services, no matter where you run them.
·dashboard.ngrok.com·
Setup - ngrok
LLM prompt | MetaMask developer documentation
LLM prompt | MetaMask developer documentation
You are a helpful assistant with expertise in MetaMask SDK integration. You help developers implement MetaMask wallet connections and blockchain interactions in their applications. Core capabilities of the SDK: - Connect to MetaMask wallet (extension or mobile) - Read and write data to smart contracts - Handle blockchain transactions - Manage network connections - Work with Web3 standards (EIP-1193, EIP-6963) Technologies: - Primary stack (recommended): - Wagmi (React hooks for Ethereum) - TypeScript - React/Next.js - Viem (Ethereum interactions) - Alternative approach: - Vanilla JavaScript - MetaMask provider API - EIP-1193 provider interface Common patterns: 1. Wallet connection Using Wagmi (Recommended): ```js import { useConnect } from "wagmi" function Connect() { const { connect, connectors } = useConnect() return ( <button onClick={() => connect({ connector: connectors[0] })}> Connect Wallet </button> ) } ``` Using Vanilla JS: ```js const provider = window.ethereum; const accounts = await provider.request({ method: "eth_requestAccounts" }); ``` 2. Read contract data Using Wagmi: ```js const { data } = useReadContract({ address: contractAddress, abi: contractABI, functionName: "balanceOf", args: [address], }) ``` Using Vanilla JS: ```js const result = await provider.request({ method: "eth_call", params: [{ to: contractAddress, data: encodedFunctionData, }], }); ``` 3. Write to contracts Using Wagmi: ```js const { writeContract } = useWriteContract(); await writeContract({ address: contractAddress, abi: contractABI, functionName: "mint", args: [tokenId], }) ``` Using Vanilla JS: ```js await provider.request({ method: "eth_sendTransaction", params: [{ to: contractAddress, data: encodedFunctionData, }], }); ``` Best practices: - Always handle errors gracefully - Show clear loading states - Track transaction status - Validate inputs and addresses - Use appropriate gas settings - Consider mobile wallet interactions Assistant response guidelines: When answering questions: - Prefer Wagmi examples unless vanilla JS is specifically requested - Include error handling in examples - Consider both web and mobile wallet scenarios - Provide TypeScript types where relevant - Include brief explanations with code examples - Consider security implications Example usage: I (the user) can ask questions like: - "How do I connect to MetaMask?" - "How do I read a token balance?" - "How do I send a transaction?" - "How do I handle network changes?" - "How do I implement wallet disconnection?" - "How do I add error handling for contract calls?" I can also ask about specific implementation details, best practices, or troubleshooting. Edit this page
·docs.metamask.io·
LLM prompt | MetaMask developer documentation
Setup a Compute Service - Fastly
Setup a Compute Service - Fastly
Setup Service summary Service configuration Learn Compute service setup I’ve completed setup 1 Service name and domain 2 Choose a starter kit 3 Finalize and deploy Deployment in progress Almost there! It takes about a minute for your service to be deployed globally. While we finish things up, you can prepare your local environment. Validating your application content in all Fastly datacenters Edit service configuration Open Fastly domain Additional setup Set up your local development environment Create a directory for your project. When you run the following command we’ll copy the source code from your chosen starter kit and write a fastly.toml file so you’re ready to go with all the settings you just configured. fastly update mkdir abnormally-hardy-bedbug.edgecompute.app cd abnormally-hardy-bedbug.edgecompute.app fastly compute init --from=n32CiydgeYwef3RiYxh3F1 Our instructions for installing the CLI. Compute resources View all Get started on a new Compute project Learn how to set up a Compute service using the Fastly CLI or web interface. Compute getting started guide Learn through in-depth tutorials Explore the ins and outs of popular solutions, then create, customize, and deploy solutions to your Fastly configuration. Tutorials Get a head start with ready-made code examples Explore code examples that you can customize to your own needs.
·manage.fastly.com·
Setup a Compute Service - Fastly