Skip to content

Instantly share code, notes, and snippets.

'use client';
!function(e){"use strict";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,s=(e,t)=>function(){return t||(0,e[o(e)[0]])((t={exports:{}}).exports,t),t.exports},l=s({"../../node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.production.min.js"(e){var t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),p=Symbol.iterator;var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,m={};function g(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}function v(){}function w(e,t,n){this.props=e,this.con
import { FileState, GoogleAIFileManager } from "@google/generative-ai/server";
import { google } from "@ai-sdk/google";
import { generateText } from "ai";
import "dotenv/config";
async function main() {
const fileManager = new GoogleAIFileManager(
process.env.GOOGLE_GENERATIVE_AI_API_KEY!
);
#!/bin/bash
install_chrome_extension () {
if [[ "$OSTYPE" == "darwin"* ]]; then
preferences_dir_path="$HOME/Library/Application Support/Google/Chrome/External Extensions"
pref_file_path="$preferences_dir_path/$1.json"
else
preferences_dir_path="/opt/google/chrome/extensions"
pref_file_path="$preferences_dir_path/$1.json"
fi
import * as React from 'react'
import * as ReactDOM from 'react-dom'
import { tipc } from './lib/tipc'
type PercentAnchor = {
kind: 'percent'
leftPct?: number
topPct?: number
widthPct?: number
heightPct?: number
@RobPruzan
RobPruzan / index.ts
Last active September 10, 2025 11:17
export const portalViews = new Map<string, WebContentsView>()
mainWindow.webContents.setWindowOpenHandler((details) => {
const { frameName } = details
if (frameName && frameName.startsWith('portal:')) {
const portalId = frameName.slice('portal:'.length)
if (portalViews.has(portalId)) {
return { action: 'deny' }
}
return {