Skip to content

Instantly share code, notes, and snippets.

View palaniraja's full-sized avatar

palaniraja palaniraja

View GitHub Profile
@palaniraja
palaniraja / startship.toml
Created June 24, 2026 19:30
~/.config/startship.toml
add_newline = true
[directory]
truncation_length = 3
truncate_to_repo=false
[git_status]
ignore_submodules = true
[c]
symbol = "C "
@palaniraja
palaniraja / Lip-N-Groove.py
Last active June 21, 2026 00:53
Lip-N-Groove freecad macro
import FreeCAD as App
import FreeCADGui as Gui
import Part
from PySide import QtWidgets, QtCore
class LipGrooveDialog(QtWidgets.QDialog):
def __init__(self, selected_faces):
super(LipGrooveDialog, self).__init__()
self.selected_faces = selected_faces
self.initUI()
@palaniraja
palaniraja / SideFlexHook.py
Last active June 20, 2026 03:43
Freecad macro to generate Side flexing hook and mate from two selected parallel edges
import FreeCAD as App
import FreeCADGui as Gui
import Part
from FreeCAD import Vector
# Cross-version PySide wrapper to handle old and new FreeCAD environments seamlessly
try:
from PySide6 import QtWidgets, QtCore
except ImportError:
try:
@palaniraja
palaniraja / gemini.ublock.rules
Last active June 7, 2026 01:18
gemini ublock origin rules
! gemini without custom font and make it bit reasonable
! Force the main conversation view to use the full screen width
gemini.google.com##.conversation-container, main, .mes-content:style(max-width: 100% !important; width: 100% !important;)
! Remove the fading mask effect on wide tables or code blocks
gemini.google.com##.table-content, .table-block:style(mask-image: none !important; -webkit-mask-image: none !important;)
! Allow elements inside the message layout to stretch completely
gemini.google.com##.table-block, split-layout:style(max-width: 100% !important; width: 100% !important;)
@palaniraja
palaniraja / main.cpp
Created June 2, 2026 05:04
ESP32 C6 deep sleep with epaper display GDEW0583Z21 600x448, UC8159c. Relevant main.cpp (esp_sleep_pd_config) ESP_PD_OPTION_ON
#include <Arduino.h>
#include <SPI.h>
#include <GxEPD2_3C.h>
// Low-level hardware power management registers for ESP-IDF v5.x targets
#include "esp_sleep.h"
#include "soc/rtc.h"
// Hardware connection pins based on your working configuration
#define EPD_SCK_PIN 18
@palaniraja
palaniraja / aircraft.html
Created May 9, 2026 04:41
Threejs RC Trainer
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Threejs RC Trainer</title>
<style>
body {
margin: 0;
overflow: hidden;
@palaniraja
palaniraja / migrate-gogs-to-forgejo.md
Last active April 26, 2026 03:54
Migrating self-hosted Gogs instance to self-hosted Forgejo

After several failed attempts to use other's scripts, I stumbled upon the following option. Worked alright for 40+ of my repos, YMMV

Migrating gogs to forgejo

  • backup gogs repo with gogs backup
    • docker exec -it gogs_container_name
    • bash8698765c2e8a:/app/gogs# USER=git ./gogs backup
  • copy the file and unzip the gogs-backup.zip
  • extract gogs-backup/repositories.zip (has all the bare repos)
@palaniraja
palaniraja / config.ghostty
Created April 25, 2026 17:21
config.ghostty -
font-family = "JetBrains Mono"
# setup XTERM (infocmp) in remote machines on ssh
shell-integration-features = ssh-env,ssh-terminfo
@palaniraja
palaniraja / config.yaml
Created April 23, 2026 10:21
~/.config/jiratui/ - some configs
jira_api_username: ''
jira_api_token: ''
jira_api_base_url: ''
active_sprint_on_startup: true
default_project_key_or_id: ""
log_file: "/Users/palani/.config/jiratui/tui.log"
log_level: "DEBUG"
# jql_expression_id_for_work_items_search: 53753 # didnt work
# only works with my fork - a0bf86a
@palaniraja
palaniraja / buildgdb.sh
Created February 24, 2026 23:54
my attempt at building gdb on m1 mac to get gdb binary with --target=aarch64-apple-darwin
#!/bin/sh
# install additional dependencies
#brew install gmp mpfr libmpc texinfo pkg-config
# clean old config
# make distclean