Skip to content

Instantly share code, notes, and snippets.

View full-sized avatar
😵‍💫
brain: too many context switches

Siddh Raman Pant siddhpant

😵‍💫
brain: too many context switches
View GitHub Profile
@siddhpant
siddhpant / keybase.md
Created September 5, 2023 10:38
Keybase identity proof
View keybase.md

Keybase proof

I hereby claim:

  • I am siddhpant on github.
  • I am siddhpant (https://keybase.io/siddhpant) on keybase.
  • I have a public key ASDmk_dNxLBn4NwJ0Xj7jtrPMyHaErfTMz0I7xKtPonQaQo

To claim this, I am signing this object:

@siddhpant
siddhpant / .bash_aliases
Last active April 26, 2023 07:08
Some helpers for using connection via proxy in bash, when you don't want to save your credentials in standard locations (for eg. in shared PCs).
View .bash_aliases
myproxy()
{
read -p "Username: " USER
read -s -p "Password: " PW
echo
hostname="proxy.example.com"
port="3128"
PROXY="$(jq -rn --arg x $USER '$x|@uri'):$(jq -rn --arg x $PW '$x|@uri')@$hostname:$port"
View spec_crash.txt
[ 186.842598] fmc: loading out-of-tree module taints kernel.
[ 186.842635] fmc: module verification failed: signature and/or required key missing - tainting kernel
[ 186.857994] spec 0000:01:00.0: probe for device 0001:0000
[ 186.858002] spec 0000:01:00.0: enabling device (0000 -> 0002)
[ 186.888160] spec 0000:01:00.0: got file "fmc/spec-init.bin", 1484404 (0x16a674) bytes
[ 187.079632] spec 0000:01:00.0: FPGA programming successful
[ 187.427747] spec 0000:01:00.0: mezzanine 0
[ 187.427749] Manufacturer: CERN
[ 187.427750] Product name: FmcDio5cha
[ 187.443343] spec 0000:01:00.0: got file "fmc/wr_nic_dio.bin", 1484960 (0x16a8a0) bytes
@siddhpant
siddhpant / .bash_aliases
Last active March 28, 2023 10:36
Bash aliases to aid in kernel dev (the previous gist got deleted, sorry)
View .bash_aliases
kgit-config() {
git config user.name "Your name"
git config user.email "your@email.com"
git config commit.gpgsign false
git config pull.rebase true
git config sendemail.smtpServer "smtp.email.com"
git config sendemail.smtpEncryption tls
git config sendemail.smtpServerPort 587
git config sendemail.smtpUser "your@email.com"
View tlp.conf
#Slimbook battery maximo rendimiento
# ------------------------------------------------------------------------------
# /etc/tlp.conf - TLP user configuration
# See full explanation: https://linrunner.de/en/tlp/docs/tlp-configuration.html
#
# New configuration scheme (TLP 1.3). Settings are read in the following order:
# 1. Intrinsic defaults
# 2. /etc/tlp.d/*.conf - Drop-in customization snippets
# 3. /etc/tlp.conf - User configuration (this file)
@siddhpant
siddhpant / dkms_sign.md
Last active May 12, 2023 12:55
DKMS auto-signing modules on install. Helpful when secure boot is on. Also contains v3 instructions.
View dkms_sign.md
View .config
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.19.0 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Debian 12.1.0-7) 12.1.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=120100
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23890
@siddhpant
siddhpant / 80-prefer-devanagari.conf
Created June 11, 2022 10:20
Change the Devanagari font on Linux
View 80-prefer-devanagari.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Set Mukta as the Devanagari font. -->
<!-- We will remove Devanagari characters from all fonts except Mukta. -->
<!-- Idea courtesy: https://stackoverflow.com/a/47614324 -->
<!-- Pseudo code: -->
<!-- for font in fonts: -->
@siddhpant
siddhpant / userChrome.css
Created October 27, 2020 14:52
Firefox's userChrome.css for some tweaks, viz., show bookmarks bar and no address bar enlargement
View userChrome.css
/*
Show bookmarks on address bar focus (and thus show automatically when a new tab opens)
From https://superuser.com/a/1520406
Original source https://www.reddit.com/r/FirefoxCSS/comments/emzoi0/show_bookmarks_bar_only_in_new_tab_page/feme6yv/
*/
#nav-bar:not(:focus-within) + #PersonalToolbar:not(:hover):not(:focus-within):not([customizing]) { visibility: collapse; }
/*
@siddhpant
siddhpant / force_adwaita_soffice.sh
Last active March 25, 2022 12:14
Force light theme on Libreoffice
View force_adwaita_soffice.sh
#!/bin/bash
# Exit when any command fails
set -e
# Check for sudo/root
if [ "$EUID" -ne 0 ]
then echo "Run this script with superuser privileges!"
echo "This is because it needs access to /usr/lib/libreoffice/program/soffice"
exit 1