Skip to content

Instantly share code, notes, and snippets.

@sainak
sainak / postgresql-setup.sh
Created May 7, 2021 20:48
setup postgres in arch linux
##############################################################
#setup postgresql
sudo pacman -S postgresql && \
sudo mkdir /var/lib/postgres/data && \
sudo chown -c -R postgres:postgres /var/lib/postgres && \
sudo -i -u postgres
initdb -D '/var/lib/postgres/data'
logout
@sainak
sainak / fish.fish
Created May 7, 2021 20:51
install fish
#install fish
paru -S fish pkgfile
#setup command not found
sudo pkgfile -u && sudo pkgfile makepkg
#install oh-my-fish
curl -L https://get.oh-my.fish | fish
#install theme
@sainak
sainak / 70-videobus.rules
Created May 8, 2021 21:24
udev rule to ignore input events form video bus. this fixes backlight changing randomly.
ACTION=="add", SUBSYSTEM=="input", ATTR{name}=="*Video Bus*", ATTR{phys}=="*LNXVIDEO*", ATTR{inhibited}="1"
@sainak
sainak / 10-quirks.conf
Last active May 9, 2021 06:27 — forked from jgkim2020/10-quirks.conf
Fix for MSI laptop random screen brightness bug(Xorg only)
# MSI laptop random screen brightness bug
# https://askubuntu.com/questions/777754/brightness-randomly-up-and-down-on-msi-laptop/808785#808785
# /etc/X11/xorg.conf.d/10-quirks.conf
Section "InputClass"
Identifier "Spooky Ghosts"
MatchProduct "Video Bus"
Option "Ignore" "on"
EndSection
@sainak
sainak / tts.py
Last active June 4, 2024 23:17
tts using google gstatic dictionary
#!/usr/bin/env python3
# ./tts.py hello world
import requests, string, os
from playsound import playsound
from sys import argv
text = (
" ".join(argv[1:]).lower().translate(str.maketrans("", "", string.punctuation)).split(" ")
)
@sainak
sainak / using-multiple-github-accounts-with-ssh-keys.md
Last active January 27, 2023 07:23 — forked from oanhnn/using-multiple-github-accounts-with-ssh-keys.md
Using multiple github accounts with ssh keys

Better requitements.txt

install pipdeptree
pip install pipdeptree
pipdeptree -f 2>/dev/null | grep -v '^ ' | tee requirements.txt
@sainak
sainak / PKGBUILD
Last active July 26, 2021 15:40
linux-amd-zen2
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.13.5 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.1.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=110100
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23601
@sainak
sainak / 80-logitech.rules
Last active July 27, 2022 05:00
udev rule to disable wakeup from logitech devices
ACTION=="add", SUBSYSTEM=="usb", ATTR{idProduct}=="c52b", ATTR{idVendor}=="046d", ATTR{power/wakeup}="disabled"
@sainak
sainak / README.md
Last active June 26, 2022 16:59
pacman hook to update the default chrome desktop entry with custom profiles

pacman hook to update the default chrome desktop entry with custom profiles

To see the available profiles run:

cat ~/.config/google-chrome/Local\ State  | jq .profile

Paste the hook in /etc/pacman.d/hooks/google-chrome-shortcut-patch.hook