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 https://stackoverflow.com/questions/107701/how-can-i-remove-ds-store-files-from-a-git-repository | |
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch | |
touch .gitignore | |
echo .DS_Store >> .gitignore | |
git add .gitignore | |
git commit --amend | |
git push -u origin main |
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
for dir in */; do cd "$dir" && git fetch && git pull && cd ..; done |
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? |
NewerOlder