Skip to content

Instantly share code, notes, and snippets.

View surajsharma's full-sized avatar
💎
punta de diamante

Suraj Sharma surajsharma

💎
punta de diamante
View GitHub Profile
@surajsharma
surajsharma / lmarena.js
Created April 9, 2025 13:11
better lmarena.ai
// ==UserScript==
// @name lmarena.ai Custom Tweaks (Wait for Height 0)
// @namespace http://tampermonkey.net/
// @version 1.5
// @description Suppress alert, hide element, and click Arena tab when model_selector_md height is zero
// @match https://lmarena.ai/*
// @grant none
// ==/UserScript==
(function () {
@surajsharma
surajsharma / mkgif.sh
Created August 14, 2025 10:17
ffmpeg gif creator
#!/bin/bash
set -e
PROG=${0##*/}
pushd "$(dirname "$0")/.." >/dev/null
popd >/dev/null
_err() { echo "$PROG: $@" >&2; exit 1; }
FPS=50
MAXSIZE=800
@surajsharma
surajsharma / import_db.py
Created August 14, 2025 10:19
import a bunch of stuff into a new db
"""Script to import any number of JSON formatted files into a db"""
import sqlite3
import requests
from tqdm import tqdm
from sqlite3 import Error
from operator import itemgetter
from collections import defaultdict
files = [
@surajsharma
surajsharma / hammerspoon-init.lua
Created August 14, 2025 10:19
hammerspoon init
local hyper = {"alt", "cmd"}
local BITLY_API_ACCESS_TOKEN = ""
-- Load Spoons
hs.loadSpoon("MiroWindowsManager")
hs.loadSpoon("ReloadConfiguration")
--hs.loadSpoon("BingDaily")
hs.loadSpoon("Caffeine")
spoon.ReloadConfiguration:start()
#!/bin/bash
# Convert WSL path to Windows path
if [ "$1" = "." ]; then
WINPATH=$(wslpath -w $(pwd))
elif [ -n "$1" ]; then
WINPATH=$(wslpath -w "$1")
else
WINPATH=""
fi
#!/bin/bash
LAST_HASH=""
# Detect clipboard tool
if command -v wl-paste &> /dev/null; then
CLIP_COPY="wl-copy"
CLIP_PASTE="wl-paste"
elif command -v xsel &> /dev/null; then
CLIP_COPY="xsel --clipboard --input"