Skip to content

Instantly share code, notes, and snippets.

View Starefossen's full-sized avatar
Developer experience in the Norwegain Government

Hans Kristian Flaatten Starefossen

Developer experience in the Norwegain Government
View GitHub Profile
Starefossen / micrometer-prometheus
Created October 4, 2023 21:01
Spring OpenTelemetry Demo Application
# HELP jvm_gc_max_data_size_bytes Max size of long-lived heap memory pool
# TYPE jvm_gc_max_data_size_bytes gauge
jvm_gc_max_data_size_bytes 8.589934592E9
# HELP executor_pool_size_threads The current number of threads in the pool
# TYPE executor_pool_size_threads gauge
executor_pool_size_threads{name="applicationTaskExecutor",} 0.0
# HELP hikaricp_connections_creation_seconds_max Connection creation time
# TYPE hikaricp_connections_creation_seconds_max gauge
hikaricp_connections_creation_seconds_max{pool="HikariPool-1",} 0.0
# HELP hikaricp_connections_creation_seconds Connection creation time
### Keybase proof
I hereby claim:
* I am starefossen on github.
* I am starefossen ( on keybase.
* I have a public key ASBrgxagN9yHjE6uZ3W6fiKcRMNTRXsgyrwvG7rf9Y32DAo
To claim this, I am signing this object:
Starefossen / gist:59e5910c15715bc73f8e5e07caf5171c
Created December 26, 2019 21:56
Restart macOS with File Vault 2 enabled remotely
sudo fdesetup authrestart
Starefossen / data.json
Last active August 22, 2019 11:25
"postfix": "Rain",
"color": "green",
"data": {
"value": "🌦"
Starefossen / gist:ea624b6da1b4e12e9b06e7b1e0254ca5
Created April 22, 2019 18:22
Get default browser on macOS
VERSIONER_PERL_PREFER_32_BIT=1 perl -MMac::InternetConfig -le 'print +(GetICHelper "http")[1]
FROM ubuntu
MAINTAINER Example McAuthor
RUN apt-get update
RUN apt-get install -y \
RUN mkdir -p /data/db
EXPOSE 27017
Starefossen / gist:7e2a8ef40ba099acbee5ed72e89d0f8e
Last active December 27, 2017 21:53
Docker Machine with Docker v1.13.1
docker-machine create --driver virtualbox --virtualbox-cpu-count 2 --virtualbox-memory 4096 --virtualbox-boot2docker-url default

Yank lines 81-91


If your fingers don't like to find the : and , keys, this would work as well (go to line 81, yank 11 lines)


My only use of g is 5gg. To go to the 5th line. 22gg: 22nd line. As jimbo said, it's really only a modifier for some other commands.

Starefossen / gist:be30fa4a1468a1472a02
Created March 9, 2016 08:22
VIM: Reformat Paragraph

On the server with tmux

Create a new tmux session:

tmux new-session -s my-session # launch `top`, `htop`, or anything that will regularly updates, then detach

Stream your session: