Skip to content

Instantly share code, notes, and snippets.

@Keshav13142
Keshav13142 / .obsidian.vimrc
Last active June 3, 2024 05:13
obsidian-vimrc
" Have j and k navigate visual lines rather than logical ones
nmap j gj
nmap k gk
" Go to beginning/end of line
nmap gh ^
nmap gl $
" Cycle between tabs
exmap tabprev obcommand workspace:previous-tab
@mischw
mischw / convert_unicode_nerdfont3.py
Last active December 29, 2023 01:07
Converts the unicode characters to the new range introduced in nerdfont 3. Conversion based on this table: https://github.com/ryanoasis/nerd-fonts/issues/1059#issuecomment-1404891287
#!/usr/bin/env python3
trans_dict = {
'\U0000f500': '\U000f0001', # vector_square
'\U0000f501': '\U000f0003', # access_point
'\U0000f502': '\U000f0002', # access_point_network
'\U0000f503': '\U000f0004', # account
'\U0000f504': '\U000f0005', # account_alert
'\U0000f505': '\U000f0006', # account_box
'\U0000f506': '\U000f0007', # account_box_outline
@romkatv
romkatv / p10k-transient-kubecontext.zsh
Last active May 9, 2020 09:22
p10k-transient-kubecontext.zsh
#### !!! THIS GIST IS OBSOLETE !!! ####
#
# There is now built-in support for transient kubecontext
# in Powerlevel10k.
#
# See: https://github.com/romkatv/powerlevel10k/#show-on-command
#
#### !!! THIS GIST IS OBSOLETE !!! ####
# Run this function from ~/.zshrc to enable transient kubernetes and/or azure
@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@major
major / i3-get-window-criteria.sh
Created February 8, 2019 14:39
Get i3 window criteria
#!/bin/sh
# Source: https://faq.i3wm.org/question/2172/how-do-i-find-the-criteria-for-use-with-i3-config-commands-like-for_window-eg-to-force-splashscreens-and-dialogs-to-show-in-floating-mode.1.html
# i3-get-window-criteria - Get criteria for use with i3 config commands
# To use, run this script, then click on a window.
# Output is in the format: [<name>=<value> <name>=<value> ...]
# Known problem: when WM_NAME is used as fallback for the 'title="<string>"' criterion,
# quotes in "<string>" are not escaped properly. This is a problem with the output of `xprop`,
# reported upstream: https://bugs.freedesktop.org/show_bug.cgi?id=66807
@OdinsPlasmaRifle
OdinsPlasmaRifle / arch_linux_installation.md
Last active June 4, 2024 10:21
LVM on LUKS Arch installation with systemd-boot
@lightcode
lightcode / OpenStack-completion-for-ZSH.md
Last active February 10, 2023 19:41
Use OpenStack client completion with ZSH

You just have to source this file.