Tested on macOS Sonoma Developer beta 2 (23A5276g)
- Download openssh-portable source code, install
libcrypto
,libfido2
; - Configure openssh-portable build system by
./configure # [options]
.
This is an up-to-date guide on running Chromium in Vercel serverless functions in 2022. What you will read below is the result of two days of research, debugging, 100+ failed deployments, and a little bit of stress.
Use chrome-aws-lambda that comes with Chromium pre-configured to run in serverless, and puppeteer-core
due to the smaller size of Chromium distributive.
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.10; | |
import {ERC20, SafeTransferLib} from "solmate/utils/SafeTransferLib.sol"; | |
import {DSTestPlus} from "solmate/test/utils/DSTestPlus.sol"; | |
struct Packet { | |
uint16 srcChainId; | |
uint16 dstChainId; |
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.10; | |
import {ERC20, SafeTransferLib} from "solmate/utils/SafeTransferLib.sol"; | |
import {DSTestPlus} from "solmate/test/utils/DSTestPlus.sol"; | |
struct Packet { | |
uint16 srcChainId; | |
uint16 dstChainId; |
// SPDX-License-Identifier: AGPL-3.0-only | |
pragma solidity >=0.8.0; | |
/// @notice Based NFT implementation. | |
abstract contract NFT { | |
/*/////////////////////////////////////////////////////////////// | |
EVENTS | |
//////////////////////////////////////////////////////////////*/ | |
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); |
import childProcess from 'child_process'; | |
import fs from 'fs'; | |
import dotenv from 'dotenv'; | |
import prettier from 'prettier'; | |
const rootDir = process.cwd(); | |
dotenv.config({ | |
path: `${rootDir}/.env.production`, | |
}); |
export default async function handleRequest( | |
request: Request, | |
responseStatusCode: number, | |
responseHeaders: Headers, | |
remixContext: EntryContext | |
) { | |
const url = new URL(request.url); | |
if (url.pathname.startsWith("/social-image")) { | |
registerFont("assets/fonts/Inter-Regular.otf", { | |
family: "Inter", |
import React, { useEffect, useRef } from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { EventEmitter } from 'events'; | |
import { Terminal } from 'xterm'; | |
import { render } from 'ink'; | |
/// <reference types="node" /> | |
import 'xterm/css/xterm.css'; | |
// this spins up Xterm.js, initializes Ink inside it and sets up |
'use strict'; | |
const { GoogleSpreadsheet } = require('google-spreadsheet'); | |
const middy = require('middy'); | |
const { cors } = require('middy/middlewares'); | |
const { to } = require('await-to-js'); | |
const moment = require('moment'); | |
const data = require('./primarycast-sheets.json'); |
//////////////////////////////////////////////////////////////////////////////// | |
// Create a directory called "pages" next to | |
// this file, put markdown files in there, and | |
// then run: | |
// | |
// ``` | |
// $ node build.mjs | |
// ``` | |
// | |
// Then deploy the "build" directory somewhere. |