Skip to content

Instantly share code, notes, and snippets.

import math
import numpy as np
import decimal
import sys
import re
from decimal import Decimal
decimal.getcontext().prec = 170
log10Two = decimal.Decimal(2).log10()
@rougier
rougier / agenda.py
Last active December 14, 2023 19:47
org-mode agenda calendar in the terminal
#!/usr/bin/env python3
# Copyright 2020 Nicolas P. Rougier - BSD License
#
# from reading org-mode emacs files, display a formated calendar in the
# terminal showing holidays and busy days and upcomiing events.
import holidays # https://pypi.org/project/holidays/
import calendar
import datetime
import orgparse # https://pypi.org/project/orgparse
@miglen
miglen / linux-networking-tools.md
Last active November 5, 2024 12:34
Linux networking tools

List of Linux networking tools

netstat (ss)

Displays contents of /proc/net files. It works with the Linux Network Subsystem, it will tell you what the status of ports are ie. open, closed, waiting, masquerade connections. It will also display various other things. It has many different options. Netstat (Network Statistic) command display connection info, routing table information etc. To displays routing table information use option as -r.

Sample output:

Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)    
tcp4 0 0 127.0.0.1.62132 127.0.0.1.http ESTABLISHED