Skip to content

Instantly share code, notes, and snippets.

View ranjithran's full-sized avatar
💭
: ( :

Ranjith ranjithran

💭
: ( :
  • Planet Earth
View GitHub Profile
@d4v3y0rk
d4v3y0rk / howto.md
Created March 14, 2020 13:04
Encryption with DM_CRYPT in WSL2

Encrypted Volumes in WSL2

Description

This is a quick guide on how to setup dm_crypt under WSL2 for working with encrypted volumes. I use an encrypted volume to store things like password recovery codes and 2nd factor backup codes etc. I recently switched over to using WSL2 and wanted to figure out how to enable this functionality there. This is the distilled howto for getting it to work.

Guide

First thing you have to do is create a custom WSL2 kernel. Inside your already installed and running WSL2 (ubuntu) installation:

  • Install some required packages.
@thedroidgeek
thedroidgeek / nokia-router-cfg-tool.py
Last active November 2, 2025 06:12
Nokia/Alcatel-Lucent router backup configuration tool
#!/usr/bin/env python3
#
# Nokia/Alcatel-Lucent router backup configuration tool
#
# Features:
# - Unpack/repack .cfg files generated from the backup and restore functionnality
# in order to modify the full router configuration
# - Decrypt/encrypt the passwords/secret values present in the configuration
@jenthone
jenthone / __python_tricks__
Last active April 21, 2023 18:04
Python - Competitive Programming Tricks
Python - Competitive Programming Tricks
@cylau1031
cylau1031 / Largest_Smaller_BST_Key.md
Created January 26, 2018 03:49
Largest Smaller BST Key

Largest Smaller BST Key

Given a root of a Binary Search Tree (BST) and a number num, implement an efficient function findLargestSmallerKey that finds the largest key in the tree that is smaller than num. If such a number doesn’t exist, return -1. Assume that all keys in the tree are nonnegative.

Analyze the time and space complexities of your solution.

Constraints

  • [time limit] 5000ms
  • [input] Node rootNode
  • [output] integer