Skip to content

Instantly share code, notes, and snippets.

View HannesHil's full-sized avatar

Hannes Hilbert HannesHil

  • inovex GmbH
  • Karlsruhe
View GitHub Profile
@molomby
molomby / github-latex-superscript-subscript-demo.md
Last active December 19, 2023 19:14
Superscript and Subscript in LaTeX for GitHub

Superscript and Subscript in LaTeX for GitHub

Experimenting GitHubs new LaTeX support to render superscript and subscript.

You can create mathematical expressions including superscript, eg:

$$e^{-\frac{t}{RC}}$$

But you can also put plaintext into superscript, inline $^{like\ this\ and\ ^{then\ go\ smaller}\ ^{if\ you\ want}}$. Subscript works the same but with _ instead of ^ and looks $_{like\ this}$.

@jjmaestro
jjmaestro / whisper-calculator.py
Last active November 26, 2019 07:13
whisper-calculator.py: Calculates the size of the whisper storage for the given retention (in frequency:history format)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def archive_to_bytes(archive):
def to_seconds(s):
SECONDS_IN_A = {
's': 1,
'm': 1 * 60,
'h': 1 * 60 * 60,
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 3, 2024 16:53
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'