Skip to content

Instantly share code, notes, and snippets.

@shuklalok
shuklalok / wait_for_tcp_port.py
Created March 23, 2021 06:53 — forked from butla/wait_for_tcp_port.py
Waiting for a TCP port to start accepting connections (Python 3)
import time
import socket
def wait_for_port(port, host='localhost', timeout=5.0):
"""Wait until a port starts accepting TCP connections.
Args:
port (int): Port number.
host (str): Host address on which the port should exist.
timeout (float): In seconds. How long to wait before raising errors.
Raises:
@shuklalok
shuklalok / signing-vbox-kernel-modules.md
Created February 23, 2021 15:12 — forked from reillysiemens/signing-vbox-kernel-modules.md
Signing VirtualBox Kernel Modules

Signing VirtualBox Kernel Modules

These are the steps I followed enable VirtualBox on my laptop without disabling UEFI Secure Boot. They're nearly identical to the process described on [Øyvind Stegard's blog][blog], save for a few key details. The images here are borrowed from the [Systemtap UEFI Secure Boot Wiki][systemtap].

  1. Install the VirtualBox package (this might be different for your platform).
    src='https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo'
@shuklalok
shuklalok / helm-cheatsheet.md
Created June 3, 2020 08:16 — forked from tuannvm/cka.md
#Helm #Kubernetes #cheatsheet, happy helming!
@shuklalok
shuklalok / tmux-migrate-options.py
Created May 7, 2020 15:47 — forked from tbutts/tmux-migrate-options.py
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
#!/usr/bin/env python
# vim: set fileencoding=utf-8
#
# USAGE:
# Back up your tmux old config, run the script and redirect stdout to your conf
# file. Example:
#
# $ cp ~/.tmux.conf ~/.tmux.conf.orig
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf
#