Skip to content

Instantly share code, notes, and snippets.

View muthuishere's full-sized avatar

Muthukumaran Navaneethakrishnan muthuishere

View GitHub Profile
@muthuishere
muthuishere / performance-wails-tauri.md
Last active April 10, 2025 18:29
performance-wails-tauri.md
Metric Why It Matters 💡 Wails (Go) Tauri (Rust) Winner
Project Init Time How fast can I start building ~8s ~5s ⚖️ Draw
Initial Full Build First full prod build 1m 22s 39m 🟡 Wails
JS Change Rebuild Simulates a small UI tweak 7.3s 73s 🟡 Wails
Backend Change Rebuild Simulates updating logic 5.0s 70s 🟡 Wails
CPU Usage CPU % used during launch (from gtime) 14% 14% ⚖️ Draw
Memory Usage (RAM) Max during runtime ~60 MB ~57 MB 🔴 Tauri
Binary Size (.app) Final output for distribution 7.4 MB 8.3 MB 🟡 Wails
Context Switches (invol) How busy the OS gets during runtime 28k 14k 🔴 Tauri
@muthuishere
muthuishere / change.js
Last active November 29, 2024 18:01
change.js
const scanner = window.scanditBarcodeScanner;
const LICENSE_KEY =
"AnSVvQefIof8PZzE4w4ouQA2MPRnE2eCEUNBLdEjIQ42QfhP02onvypIppy8DyBLqCv4O65DqbCxZVcEBVZVW+M45Ma5UF1rwUU0jUUi9zPTeMvPPClia5Vpm2AZI82ztiFQX4xx0XIfQV/kfUEFLtl0WYHJLc9pahG3lv8luaswHIOuanNjocR5xlqnH8dMNDUzycoiOlWpGJ5mA3ka9KVIV4WIAjg+xhkRL0A/0CCxIIW8tSsg4ztzxvaJa7tNRwU3jrwKmoT7FFOQKw29UzYRF80fLZkpXhZq87gsrkASHToz1DdSA2o3mzdKIGwLniE6q+Ajlxw/ADmdwg7CgyMrw2MxJADQNGwllIxp3ILxQsDbvkTui2wFmaqba3Rol0PvX3JDSJMWdeLbhweGe1NN3jE5RGTCEUQORSEQH11+TCfkMDcl1clA4mT/UxEQG28p5Td/d3MEQiwHiD/segJ8oGWJSkr2LmV0Ix8ZD1qccVx3dUH5qHk4TtBofyjMHF3RhLNqKb7kSRlWfHEYe1ljrm4rTiPb8l2CFgh9zXyxEt7ZICOQ8fpcoV70SMtsqWavTfdu499lWpsDXQWliTV3Q9ViXtyK+0VO3scFK/byX0kXv3rxx7tRdpjjYHF4owBPdM1Ga+XHX+veOnwYXiRy933zRjO7PE7zN+9S99JdTvbgHnZ8QsRhuVq4eSYZFCvTsHZE7GvqeGotLltKVlFTeygcc1Dmci3J6X5y9NS+VECdRBZI8DlFyWeVSUMMFg2FokBYIiFyP6WQWyuIR1yjcLcO8F6HJMgsqf81rM/o9M5XlgUgDTvHVOqDgXuMJO4E59JJwPs9lAWm4r7bUm72r9djqYQv3ZCX6z7YqnqUvo37bXOVoqg5++f108eIRPgnGwjDAnphmBp0YpXVFzIjISUhp5BW
@muthuishere
muthuishere / PdfProcessor.java
Created November 7, 2024 08:20
Spring Ai for Organization
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.apache.pdfbox.pdfparser.PDFParser;
import org.apache.pdfbox.pdmodel.PDDocument;
@muthuishere
muthuishere / loadenv.md
Created October 25, 2024 15:06
Load all the environment variables in the current session mac or linux

add it to .bashrc or .zshrc

alias loadenv='[ -f .env ] && export $(grep -v "^#" .env | xargs) && echo ".env variables have been loaded into the current session." || echo ".env file not found in the current directory."'

Upon any folder , which has a .env file , just call the alias loadenv it will load all the variables as environment variables in current session

const fs = require('fs');
const xml2js = require('xml2js');
const path = require('path');
class SoapUIProjectParser {
constructor() {
this.parser = new xml2js.Parser();
this.SOAPUI_NS = 'http://eviware.com/soapui/config';
}
@muthuishere
muthuishere / find_str.sh
Created August 4, 2024 04:37
A Script to find text containing PeerConnection in javascript files and within subfolders excluding .git and node_modules folder and with gnu parallel for
find . -type d \( -name .git -o -name node_modules \) -prune -o -type f -name "*.js" -print | parallel grep -H "PeerConnection" {}
@muthuishere
muthuishere / VectorSearchController.java
Created July 25, 2024 19:19
Snippet for vector search
public record SimilaritySearchRequest(String question, Integer limit, Double maximumDistance) {
public SimilaritySearchRequest {
if (limit == null) {
limit = 4; // Default value for limit is set to 4
}
if (maximumDistance == null) {
maximumDistance = 1.0; // Default value for threshold is set to 1.0
@muthuishere
muthuishere / intercept_ajax_ws.js
Created May 31, 2024 06:42
Intercept AJax , websocket requests from browser
(function() {
// Save the original WebSocket constructor
const OriginalWebSocket = window.WebSocket;
// Define a new constructor that modifies the WebSocket behavior
window.WebSocket = function(url, protocols) {
const ws = new OriginalWebSocket(url, protocols);
// Store the original send method
const originalSend = ws.send;
@muthuishere
muthuishere / mockecomstore.sql
Created April 1, 2024 03:03
mock ecom store schema and data
This file has been truncated, but you can view the full file.
-- Drop existing tables if they exist
DROP TABLE IF EXISTS user_profile, inventory, order_detail, payment_details, shipping_details CASCADE;
-- User Profile Table
CREATE TABLE user_profile (
user_id VARCHAR(100) PRIMARY KEY,
name VARCHAR(100),
email VARCHAR(100) UNIQUE,
@muthuishere
muthuishere / ClassicThread.java
Created September 21, 2023 17:11
Virtual Thread Demo
import java.util.ArrayList;
import java.util.List;
public class ClassicThread {
void handleRequest() {