Skip to content

Instantly share code, notes, and snippets.

View sandys's full-sized avatar

Sandeep Srinivasa sandys

View GitHub Profile
@sandys
sandys / agent loop
Created March 10, 2025 07:25 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@sandys
sandys / fail2ban-rdp.md
Created September 8, 2024 09:43
fail2ban rdp

[rdp] enabled = true filter = rdp action = iptables-multiport[name=rdp, port="3389,3390,3391", protocol=tcp] logpath = /var/log/xrdp.log maxretry = 5

filter filter.d/rdp.conf

[Definition]

@sandys
sandys / finternet-wootzapp-browser-checkout.md
Last active September 7, 2024 07:12
finternet integration into browser checkout

Android WebAuthn + SIMD48 Solana Multi-Sig Application : Ecommerce Checkout integrated into browser using Finternet

We propose the development of an Android application that leverages WebAuthn, SIMD48 processing, and Solana's multi-signature capabilities to create a secure and user-friendly Finternet browser. This browser will enable anyone to open ecommerce websites, process Finternet WebAuthn requests using the device's fingerprint sensor, and complete transactions through a Solana multi-sig contract.

The ideal finternet checkout flow on a browser would be :

  1. shopify checkout page has webauthn integrated into it
  2. when u click the "pay now with finternet" button on the shopify site
  3. a webauthn+simd48 key is created using the users fingerprint on the phone (which wootzapp pops up
  4. then the user uses this key + wallet key to sign the finternet MPC contract
@sandys
sandys / cursor-configuration.md
Last active September 17, 2024 17:27
running anything in the background (very simply!!)

How to setup cursor.sh so that you are able to use it on remote server with tmux

add the following to your settings.json

image

{
  "terminal.integrated.profiles.linux": {
 "tmux": {
@sandys
sandys / MOTA - Honest Voting.md
Last active January 27, 2023 09:08
MOTA (Many of the Above) or Honest Voting - an application of approval voting in India.

MOTA (Many of the Above) is Honest voting - you dont have to fear about vote wasting

This is very easy to describe to voters: vote for everyone you approve of.
MOTA does one thing very well - it removes any reason to vote against your favorite candidate.

Intuitive Explanation

In any voting system, if there's only ONE candidate - not voting and voting for the candidate are the same.
For TWO candidates - it is better to pick the one you like more.

1. If ur upgrading from an older fedora,
1.1 `sudo dnf remove docker-*`
1.2 `sudo dnf config-manager --disable docker-*`
1.2 please ensure `/etc/default/grub` doesnt contain `systemd.unified_cgroup_hierarchy=0`. If it does contain, then remove it and run `sudo grub2-mkconfig -o /boot/grub2/grub.cfg`
2. reboot
3. set firewall correctly using `sudo firewall-cmd --zone=docker --change-interface=docker0`
4. in `/etc/sysconfig/docker` please ensure `--live-restore` is removed
5. reboot
6. docker should work
@sandys
sandys / Fastapi-sqlalchemy-pydantic-dataclasses-reloadable-logging.md
Last active June 30, 2024 09:23
fastapi with python 3.10 dataclasses - used to create both sqlalchemy and pydantic models simultaneously. And setting up sqlalchemy the right way (without deadlocks or other problems). Additionally, this also takes care of unified logging when running under gunicorn..as well as being able to run in restartable mode.
@sandys
sandys / git_100mb_clean.md
Created April 28, 2020 14:13
how to clean your git repo of all blobs greater than 100M (github friendly)
  1. Download git-filter-repo script
  2. name the file as clean.py
  3. run python /tmp/clean.py --force --strip-blobs-bigger-than 100M --refs
@sandys
sandys / pg-docker.md
Created March 20, 2020 09:27
running postgresql on your laptop without installing it (using docker) . with connections to python

docker network create pg

docker run -it --rm -P -p 5432:5432 --name pg -e POSTGRES_PASSWORD=password -e POSTGRES_USER=postgres -e POSTGRES_DB=production -v pgdata:/var/lib/postgresql/data --network=pg postgres

pgdata is the name of the docker volume. You can check it using docker volume ls and docker volume inspect pgdata. You can delete the docker volume by docker volume rm pgdata and prune all volumes using docker volume prune docker volumes are created in your central docker directory (usually /var/lib/docker/overlay2 ). You generally dont need to care about this.

You can now access it in many ways: