Skip to content

Instantly share code, notes, and snippets.

@koila29
koila29 / nv-chad.md
Created July 18, 2024 00:35 — forked from wisnuwiry/nv-chad.md
A basic keyboard shortcut for the vim/nvim editor.

General

  1. Show Documentation: K
  2. Go to Code Action: leader + ca
  3. Go to Definition: gd
  4. Comment: leader + /
  5. Toggle Line Number: leader + n
  6. New Buffer: leader + b
  7. Relative number: leader + rn
  8. Copy whole file: Ctrl + c
@koila29
koila29 / 15_python_tips.md
Created October 12, 2023 23:47 — forked from Julynx/15_python_tips.md
15 Python Tips To Take Your Code To The Next Level!
@koila29
koila29 / AES_example.py
Created September 27, 2023 13:58 — forked from syedrakib/AES_example.py
an example of symmetric encryption in python using a single known secret key - utilizes AES from PyCrypto library
# Inspired from https://pythonprogramming.net/encryption-and-decryption-in-python-code-example-with-explanation/
# PyCrypto docs available at https://www.dlitz.net/software/pycrypto/api/2.6/
from Crypto.Cipher import AES
import base64, os
def generate_secret_key_for_AES_cipher():
# AES key length must be either 16, 24, or 32 bytes long
AES_key_length = 16 # use larger value in production
# generate a random secret key with the decided key length