Skip to content

Instantly share code, notes, and snippets.

View ipruning's full-sized avatar
👨‍💻
Coding

ipruning ipruning

👨‍💻
Coding
  • Edinburgh, UK ⇌ Shanghai, China
  • X @ipruning
View GitHub Profile
@ipruning
ipruning / surfingkeys.js
Last active November 15, 2024 09:17
surfingkeys.js
api.Hints.style(`
font-family: 'MonoLisa Nerd Font', monospace;
font-size: 12px;
`);
api.mapkey('<Ctrl-d>', 'Scroll down half page', function () {
api.Normal.scroll('pageDown');
});
api.mapkey('<Ctrl-u>', 'Scroll up half page', function () {
api.Normal.scroll('pageUp');
def ipv4_to_uint32(ip_address: str) -> int:
"""Convert an IPv4 address string to a 32-bit unsigned integer.
This function parses an IPv4 address string and converts it to its
equivalent 32-bit unsigned integer representation.
Args:
ip_address (str): A string representing an IPv4 address in dotted-decimal notation.
Raises: