Preferences: Open Keyboard Shortcuts (JSON)
Add something like this:
// removes duplicate lines: find ^(.+)(?:\r?\n\1)+$ → replace $1
{
"key": "ctrl+alt+d",
"command": "actions.findWithArgs",
"args": {
"searchString": "^(.+)(?:\\r?\\n\\1)+$",
| #!/bin/bash | |
| # Move /tmp from a RAM tmpfs (1.9G) to a disk-backed 10G ext4 image on /dev/sda2, | |
| # keeping the "wiped on every boot" behaviour a tmpfs gave for free. | |
| set -euo pipefail | |
| IMG=/var/tmp-disk.img | |
| SIZE=10G | |
| [ "$(id -u)" -eq 0 ] || { echo "run as root"; exit 1; } |
Preferences: Open Keyboard Shortcuts (JSON)
Add something like this:
// removes duplicate lines: find ^(.+)(?:\r?\n\1)+$ → replace $1
{
"key": "ctrl+alt+d",
"command": "actions.findWithArgs",
"args": {
"searchString": "^(.+)(?:\\r?\\n\\1)+$",
| APP_ENV=production | |
| MONOFLAKE_NODE=0 |
Libp2p is one of most commonly used libraries across web3 infrasture. It exposes several metrics compatible with Prometheus.
The official github repo has Grafana dashboard json for a quick start.
| #!/bin/bash | |
| ip neigh show dev wlan0 |
sudo raspi-config nonint do_blanking 0sudo loginctl enable-linger $(whoami)sudo setterm -powerdown 0 and sudo setterm -powersave off| # Using this composer in the machines that a specific app runs which opens the port for prometheus | |
| # Using promtail collect logs and publish to external loki | |
| version: '3.8' | |
| networks: | |
| monitoring: | |
| driver: bridge | |
| services: | |
| cadvisor: |
Downloading a tar.gz file and extracting it after the download completes might consume a lot of disk space and time.
It is possible to write tar.gz file directly as input to tar command and untar it to directory directly from remote url.
wget -qO- your_link_here | tar -xvz -C /target/directory