Skip to content

Instantly share code, notes, and snippets.

Contributor License Agreement

Thank you for your interest in contributing to Witsy (the "Project"). To clarify the intellectual property license granted with Contributions from any person or entity, Kochava Inc. (the "Project Maintainer") must have a Contributor License Agreement ("CLA") on file that has been signed by each contributor, indicating agreement to the license terms below. This agreement is for your protection as a contributor as well as the protection of the Project and its users; it does not change your rights to use your own Contributions for any other purpose.

By signing this Contributor License Agreement, you accept and agree to the following terms and conditions for your present and future Contributions submitted to the Project.

  1. Definitions “You” (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with the Project Maintainer. "Contribution" shall mean any original work of authorship, including any modifications o
@nbonamy
nbonamy / export.js
Last active August 23, 2025 22:24
Script to dump all login items from Bitwarden browser extension
//
// In case you have lost your master password but can log in the extension using TouchID or similar
// This was tested in Edge so should be working in Chrome
// Open the extension window and detach it
// Filter to show only logins as this script was meant for that only :)
// Then press shortcut to open developer tools
// Copy/Paste script in console and be patient!
// NOTE: the script will fail if you have two items that have the same title and username (cleanup before running it!)
//
@nbonamy
nbonamy / kill.sh
Created April 10, 2025 15:58
kdevtmpfsi / kinsing removal
sudo killall kdevtmpfsi kinsing dbused
sudo rm /tmp/kdevtmpfsi /tmp/kinsing /tmp/dbused
sudo find / -iname kdevtmpfsi
sudo find / -iname kinsing
sudo find / -iname dbused
sudo crontab -u root -e
sudo crontab -u redis -e
sudo crontab -u www-data -e
@nbonamy
nbonamy / index.ts
Created March 6, 2025 17:47
Witsy automatic translation
#!/usr/bin/env npx ts-node
import * as llm from 'multi-llm-ts'
import fs from 'fs'
const DEFAULT_ENGINE = 'anthropic'
const DEFAULT_MODEL = 'claude-3-7-sonnet-20250219'
// Parse command line arguments
const args = process.argv.slice(2);
@nbonamy
nbonamy / index.ts
Created February 23, 2025 15:44
Witsy automatic localization
import * as llm from 'multi-llm-ts'
import fs from 'fs'
const system = `You are an assistant helping to add i18n to a project.
The project is an electron app written in TypesSrcipt and Vue 3.
The project uses vue-i18n for internationalization.
The project uses bootstrap-icons-vue for icons.
You will given a file to localize and your objective is to extract all the hardcoded strings and replace them with i18n keys.
If you do not detect any hard-coded string, skip the file without modifying it.
@nbonamy
nbonamy / version.json
Last active October 22, 2025 00:51
Witsy CI Badges
CI Badges
@nbonamy
nbonamy / main.py
Created May 3, 2024 17:11
Order Processing Program
import os
import json
from langchain_openai import ChatOpenAI
from langchain_community.vectorstores import Chroma
from langchain_community.embeddings import HuggingFaceEmbeddings
os.environ['TOKENIZERS_PARALLELISM']='false'
os.environ['OPENAI_API_KEY']='YOUR_API_KEY'
input = "I would like to order 10 Garden Hoses, 5 iPhone and 10 Sump Pump."
@nbonamy
nbonamy / agent.py
Created May 3, 2024 17:09
Order Processing Agent
import os
import json
from langchain import hub
from langchain_community.vectorstores import Chroma
from langchain.agents import AgentExecutor, create_openai_tools_agent
from langchain_openai import ChatOpenAI
from langchain_core.tools import tool
from langchain_community.agent_toolkits import FileManagementToolkit
from langchain_community.embeddings import HuggingFaceEmbeddings
@nbonamy
nbonamy / agent.py
Created May 3, 2024 17:05
National Park Agent
import os
import requests
from langchain import hub
from langchain.agents import AgentExecutor, create_openai_tools_agent
from langchain_openai import ChatOpenAI
from langchain_core.tools import tool
from langchain_community.tools import WikipediaQueryRun
from langchain_community.utilities import WikipediaAPIWrapper
from langchain_community.agent_toolkits import FileManagementToolkit
from langchain_community.tools.tavily_search import TavilySearchResults
@nbonamy
nbonamy / tcofix.js
Last active February 1, 2024 20:24
t.co links fixer
setInterval(() => {
let links = document.getElementsByTagName('a')
for (let link of links) {
let href = link.href
if (href.indexOf('https://t.co/') === 0) {
link.href = `http://redirect.bonamy.fr/?url=${href}`
}
}
}, 500)