Skip to content

Instantly share code, notes, and snippets.

@bharathyes
bharathyes / animations.conf
Created February 9, 2025 16:37
Hyprland - CachyOS - Init Configs
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
# ┃ Animations Configuration ┃
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
# https://wiki.hyprland.org/0.45.0/Configuring/Animations/
animations {
enabled = yes
bezier = overshot, 0.13, 0.99, 0.29, 1.1
animation = windowsIn, 1, 4, overshot, slide
@bharathyes
bharathyes / raze-history-pushed-secret.sh
Created July 25, 2024 21:01
Remove pushed secret from git history
# https://github.com/bharathyes/git-session
# ----------------------------------------
echo "BASIC_CONFIG=director/name" > config.env
echo "print()" > python.py
git add config.env
git commit -m "Add default configuration file"
echo "API_KEY=supersecretkey123" >> config.env
git add config.env
@bharathyes
bharathyes / pi-pic-led-layer-indicator.c
Last active June 21, 2024 03:28
QMK Layers indicated with Pi Pico's onboard LED
// Pi Pico has the onboard LED wired to GP25 pin & GPIO17(D5 by pro micro convention) for splinky. B0 supposed to have led on pro micro board but not observed on splinky.
// reference doc : https://github.com/qmk/qmk_firmware/blob/master/docs/drivers/gpio.md#gpio-control-gpio-control
layer_state_t layer_state_set_user(layer_state_t state) {
gpio_set_pin_output(GP25); // set pin as output mode. Probably a better way to set this only once.
switch (get_highest_layer(state)) {
case 0:
gpio_write_pin_low(GP25); // LED stays off on base layer and lights up for all other layer.
break; // brightness level might be useful to explore but not too useful compared to a proper RGB
default:
@bharathyes
bharathyes / macropad-4-5-encoder-kmk-pico-code.py
Last active December 14, 2023 10:48
Macropad 4x5 with an encoder using KMK based on rpi pico
import board
from kmk.kmk_keyboard import KMKKeyboard
from kmk.consts import UnicodeMode
from kmk.keys import KC
from kmk.scanners import DiodeOrientation
from kmk.modules.layers import Layers
from kmk.modules.encoder import EncoderHandler
from kmk.modules.combos import Combos, Chord, Sequence
from kmk.modules.holdtap import HoldTap
@bharathyes
bharathyes / relative-symlink-powershell.ps1
Created August 24, 2023 08:44
Create relative SymLinks on Powershell
@bharathyes
bharathyes / dash-to-panel-popos-config
Created May 7, 2023 17:59
Dash to Panel config Gnome Ext
[/]
animate-appicon-hover=true
animate-appicon-hover-animation-convexity={'RIPPLE': 2.0, 'PLANK': 1.8}
animate-appicon-hover-animation-extent={'RIPPLE': 4, 'PLANK': 4, 'SIMPLE': 1}
animate-appicon-hover-animation-rotation={'SIMPLE': -14, 'RIPPLE': 10, 'PLANK': -10}
animate-appicon-hover-animation-travel={'SIMPLE': 0.40999999999999998, 'RIPPLE': 0.40000000000000002, 'PLANK': 0.10000000000000001}
animate-appicon-hover-animation-type='PLANK'
animate-appicon-hover-animation-zoom={'SIMPLE': 1.5800000000000001, 'RIPPLE': 1.25, 'PLANK': 2.0}
appicon-margin=5
appicon-padding=2
@bharathyes
bharathyes / developer-excuses-variety.py
Created March 1, 2023 13:24
Variety quotes plugin to fetch developer excuses from https://api.devexcus.es/
import os
import re
from variety.plugins.IQuoteSource import IQuoteSource
from gettext import gettext as _
import logging
try:
from urllib.request import Request, urlopen # Python 3
except ImportError:
from urllib2 import Request, urlopen # Python 2
import json
@bharathyes
bharathyes / mongo-db-secured-docker-compose.yml
Created February 25, 2023 17:56
mongo db password secured docker container
version: '3.3'
services:
mongo-db:
image: mongo:latest
container_name: mongo-db
ports:
- '27017:27017'
volumes:
- 'mongo-vol:/data/db'
restart: always
@bharathyes
bharathyes / release-please-versioning-automation.md
Last active September 27, 2022 18:00
Release Please project versioning automation process

Using Release-please GH Action for automated maintainance of versioning, tags and changelogs of a repository.

Conventions to follow

make sure to follow above conventions for all commits

@bharathyes
bharathyes / colemak-caw-dreymar.md
Last active May 14, 2023 08:40
Linux ubuntu colemak extend caw keyboard DreymaR cmd
setxkbmap -model 'pc104aw-zqu' -layout 'us(cmk_ed_us)' -option 'misc:extend,lv5:caps_switch_lock,ctrl:swap_lalt_lctl,lv3:ralt_alt,grp:shifts_toggle,compose:menu,misc:cmk_curl_dh'