Skip to content

Instantly share code, notes, and snippets.

View adhiraj2001's full-sized avatar

Adhiraj Deshmukh adhiraj2001

View GitHub Profile
var timer=100;document.querySelectorAll("div > input[type='checkbox']:checked").forEach((interest) => {setTimeout(function(){interest.click()},timer);timer+=2000;});
@adhiraj2001
adhiraj2001 / add_to_zshrc.sh
Created August 27, 2024 05:20 — forked from karpathy/add_to_zshrc.sh
Git Commit Message AI
# -----------------------------------------------------------------------------
# AI-powered Git Commit Function
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It:
# 1) gets the current staged changed diff
# 2) sends them to an LLM to write the git commit message
# 3) allows you to easily accept, edit, regenerate, cancel
# But - just read and edit the code however you like
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/
gcm() {
@adhiraj2001
adhiraj2001 / cuda_install.md
Created July 22, 2024 17:42 — forked from denguir/cuda_install.md
Installation procedure for CUDA & cuDNN

How to install CUDA & cuDNN on Ubuntu 22.04

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

@adhiraj2001
adhiraj2001 / colmap2poses.py
Created December 18, 2023 05:08 — forked from Sazoji/colmap2poses.py
colmap2poses is simple! make sure you have opencv (and rembg if you wish to mask). The only thing required is a path to the dataset folder, containing a "images" subfolder. Avoid weird filenames.
# most of the code is refactored colmap parsing from LLFF, a GPLv3 project.
# this is meant to be comparable to instant-ngp's colmap2nerf.py, and uses the
# same arguments, with additional functions for masking and LLFF format poses.
# LLFF format .npy files will always be made, remove if you ONLY want NeRF format
#~~~provide a dataset folder path with another "image" subfolder with the pics~~~
# ~~~colmap can be installed to PATH or linked as an argument (--colmap_path)~~~
# usage: (for LLFF format, nvdiffrec)
# colmap2poses.py --mask "/path/to/dataset/"
@adhiraj2001
adhiraj2001 / Guide to setup the homeserver from scratch (Lucy).md
Created September 20, 2023 19:34
Guide to setup the homeserver from scratch (Lucy)

Guide to setup the homeserver from scratch

calibre-web

    calibre-web:
        image: lscr.io/linuxserver/calibre-web:amd64-latest
        container_name: calibre-web
        environment:
            - PUID=1000
 - PGID=1000
@adhiraj2001
adhiraj2001 / Info.md
Created September 11, 2023 10:51 — forked from tdgunes/Info.md
ExampleAgent for Genius 7.1.6
@adhiraj2001
adhiraj2001 / flick.lua
Created September 8, 2023 19:55 — forked from byhemechi/flick.lua
Logitech Mouse Flick Lua script
function OnEvent(event, arg)
if (event == "MOUSE_BUTTON_PRESSED" and arg == 3) then
distance = 512
Sleep(200)
MoveMouseRelative(-distance, 0)
Sleep(500)
MoveMouseRelative(distance, 0)
PressAndReleaseMouseButton(1)
MoveMouseRelative(distance, 0)
Sleep(500)
@adhiraj2001
adhiraj2001 / hand-modify-pdf.md
Created September 5, 2023 08:11 — forked from senderle/hand-modify-pdf.md
So you want to modify the text of a PDF by hand

So you want to modify the text of a PDF by hand...

If you, like me, resent every dollar spent on commercial PDF tools, you might want to know how to change the text content of a PDF without having to pay for Adobe Acrobat or another PDF tool. I didn't see an obvious open-source tool that lets you dig into PDF internals, but I did discover a few useful facts about how PDFs are structured that I think may prove useful to others (or myself) in the future. They are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.

@adhiraj2001
adhiraj2001 / yaycache
Created August 25, 2023 16:49 — forked from albertored11/yaycache
Script and hook to clean pacman and yay cache
#!/usr/bin/env bash
# Assuming yay is run by user with UID 1000
admin="$(id -nu 1000)"
cachedir="/home/$admin/.cache/yay"
removed="$(comm -23 <(basename -a $(find $cachedir -mindepth 1 -maxdepth 1 -type d) | sort) <(pacman -Qqm) | xargs -r printf "$cachedir/%s\n")"
# Remove yay cache for foreign packages that are not installed anymore
rm -rf $removed
@adhiraj2001
adhiraj2001 / tmux-cheatsheet.markdown
Created August 18, 2023 10:14 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname