Skip to content

Instantly share code, notes, and snippets.

View Lp-Francois's full-sized avatar
:octocat:
Working on cool projects

François Lp-Francois

:octocat:
Working on cool projects
View GitHub Profile

Moved to repo: /quenhus/uBlock-Origin-dev-filter

In order to keep filters up to date, please use this repo.

# Fancy welcome message
emojis=("🎯" "🏹" "🚀")
expressions=(
"Arguing that you don't care about the right to privacy because you have nothing to hide is no different than saying you don't care about free speech because you have nothing to say."
"Step by step."
"Keep it simple."
"It doesn't work? Come back to a working state."
"Communication is the key.")
RANDOM1=$$$(date +%s)
RANDOM2=$$$(date +%s)
@max-rocket-internet
max-rocket-internet / prom-k8s-request-limits.md
Last active November 13, 2025 21:29
How to display Kubernetes request and limit in Grafana / Prometheus properly

CPU: percentage of limit

A lot of people land when trying to find out how to calculate CPU usage metric correctly in prometheus, myself included! So I'll post what I eventually ended up using as I think it's still a little difficult trying to tie together all the snippets of info here and elsewhere.

This is specific to k8s and containers that have CPU limits set.

To show CPU usage as a percentage of the limit given to the container, this is the Prometheus query we used to create nice graphs in Grafana:

sum(rate(container_cpu_usage_seconds_total{name!~".*prometheus.*", image!="", container_name!="POD"}[5m])) by (pod_name, container_name) /
@RomainLanz
RomainLanz / .vimrc
Last active November 11, 2019 18:15
set nocompatible " Use VIM settings instead of Vi.
syntax enable " Enable syntax highlighting.
so ~/.vim/plugins.vim " Load all plugins.
"-------------Misc-------------"
set backspace=indent,eol,start " Make backspace behave like every other editor.
set tw=0 " Disable automatic linebreak.
set noerrorbells visualbell t_vb= " No damn bells!
set autowriteall " Automatically write the file when switching buffer.
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active December 13, 2025 05:10
set -e, -u, -o, -x pipefail explanation
@tinogomes
tinogomes / DNS_TO_LOCALHOST.markdown
Last active December 6, 2025 03:43
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.

Example:

# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com
@Ashton-W
Ashton-W / Issue.md
Last active December 9, 2025 02:07
GitHub Markdown toggle code block
Click to toggle contents of `code`
CODE!
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active December 12, 2025 13:21
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@willurd
willurd / web-servers.md
Last active December 10, 2025 10:35
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000