This file contains hidden or 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
# This script should be run with sudo | |
useradd --disabled-password --create-home $1 | |
passwd -dl $1 | |
usermod -g sshers $1 # Use your own group if you have one, if not remove this line | |
mkdir -p /home/$1 | |
chown -R $1:$1 /home/$1 | |
sudo -u $1 ssh-keygen -f /home/$1/.ssh/rd_rsa -q -N "" # Specify a passphrase if you need one | |
mv /home/$1/.ssh/id_rsa.pub /home/$1/.ssh/authorized_keys |
This file contains hidden or 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 def create_browser_context(p: Playwright) -> BrowserContext: | |
browser_context: BrowserContext = await p.chromium.launch_persistent_context( | |
user_data_dir=f"./browser_profiles/{str(uuid4())}", | |
args=[ | |
"--password-store=basic", | |
"--disable-features=site-per-process", | |
"--disable-blink-features=AutomationControlled", | |
"--disable-web-security", | |
"--disable-audio-output", | |
"--disable-gpu", |
This file contains hidden or 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 re | |
from asyncio import run as run_async | |
from typing import Optional, Type | |
from bs4 import BeautifulSoup | |
from langchain_core.callbacks.manager import AsyncCallbackManagerForToolRun | |
from langchain_core.tools import BaseTool | |
from playwright.async_api import BrowserContext, Page, async_playwright | |
from pydantic import BaseModel, Field |
This file contains hidden or 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 json | |
from asyncio import run as run_async | |
from typing import Optional, Type | |
from urllib.parse import quote_plus | |
from bs4 import BeautifulSoup, ResultSet, Tag | |
from langchain_core.callbacks.manager import AsyncCallbackManagerForToolRun | |
from langchain_core.tools import BaseTool | |
from playwright.async_api import Browser, Page, async_playwright | |
from pydantic import BaseModel, Field |
This file contains hidden or 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
{ | |
"telemetry": { | |
"metrics": false, | |
"diagnostics": false | |
}, | |
"features": { | |
"edit_prediction_provider": "zed" | |
}, | |
"theme": { | |
"mode": "system", |
This file contains hidden or 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
echo From https://medium.com/dandelion-tutorials/how-to-fix-chown-permission-denied-issue-when-using-colima-on-mac-os-x-d925e420c875 | |
colima stop | |
cd ~/.colima/_lima/_config | |
mv {dir}/override.yaml override.yaml | |
colima delete | |
colima start --mount-type 9p |
This file contains hidden or 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
FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim | |
WORKDIR /langflow | |
RUN uv venv | |
RUN uv pip install langflow | |
RUN echo DO_NOT_TRACK=true > .env | |
EXPOSE 7860 | |
CMD ["uv", "run", "langflow", "run", "--host", "0.0.0.0", "--port", "7860", "--env-file", ".env"] |
This file contains hidden or 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 SocketIO | |
import SwiftUI | |
struct SocketeerView: View { | |
@State var socketHost: String = "" | |
@State var socketRoomName: String = "" | |
@State var isSocketHTTPS: Bool = false | |
@State var manager: SocketManager? | |
@State var socket: SocketIOClient? |
This file contains hidden or 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
InsertYourViewHere() | |
.overlay { | |
GeometryReader { proxy in | |
let height: Float = Float(proxy.size.height) | |
let width: Float = Float(proxy.size.width) | |
let depth: Float = 30.0 | |
let x1: Float = 0.00 | |
let x2: Float = depth / width * 0.50 |
This file contains hidden or 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 apt-get update | |
RUN apt-get install -y wget | |
RUN wget -q -P ./chrome https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
RUN apt-get install -y ./chrome/google-chrome-stable_current_amd64.deb | |
RUN apt-get install -y curl zip | |
RUN set -ex; \ | |
CHROMEDRIVER_VERSION=$(curl -s "https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_STABLE"); \ |
NewerOlder