Skip to content

Instantly share code, notes, and snippets.

View b1rdex's full-sized avatar
🚀
༼ つ◕_◕ ༽つ

Anatoly Pashin b1rdex

🚀
༼ つ◕_◕ ༽つ
View GitHub Profile
@shamil
shamil / mount_qcow2.md
Last active May 7, 2024 20:53
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@lichti
lichti / letsencrypt-proxmox.md
Last active September 12, 2022 20:14
Proxmox with letsencrypt ssl
git clone https://github.com/certbot/certbot /opt/letsencrypt
ln -s /opt/letsencrypt/certbot-auto /usr/bin/certbot
certbot certonly --expand --agree-tos --text --non-interactive \
 --standalone \
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 7, 2024 16:31
set -e, -u, -o, -x pipefail explanation
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active May 6, 2024 10:42
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@sindresorhus
sindresorhus / esm-package.md
Last active May 7, 2024 08:55
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@huksley
huksley / deploy.yml
Last active February 11, 2024 07:21
Full configuration example for mrsk for NextJS. Save as config/deploy.yml See more at https://github.com/mrsked/mrsk
# yaml-language-server: $schema=https://raw.githubusercontent.com/kjellberg/mrsk/validate-with-json-schema/lib/mrsk/configuration/schema.yaml
service: testexample
image: githubuser/test/main
servers:
web:
hosts:
- 1.1.1.1
labels:
traefik.http.routers.web.rule: Host(`test.example.com`)
traefik.http.routers.web_secure.entrypoints: websecure
@huksley
huksley / mrsk.md
Last active January 12, 2024 17:24
mrsk - the missing manual

MRSK

This documentation adds important additions to the docs for mrsk deploy tool (see github.com/mrsked/mrsk)

Destination flag

You can use mrsk deploy --destination staging

This will read config/deploy.yml and config/deploy.staging.yml files, and also will read .env.staging file if it exists.

@huksley
huksley / mrsk-accessory-docker-registry.yml
Last active August 13, 2023 10:56
Run docker registry as mrsk accessory
registry-github: &docker
username: username
password:
- DOCKER_TOKEN
registry-internal: &internal
server: registry.example.com
username: testuser
password: testpassword123
# This uses YAML magic and Ruby template language to select registry on the fly
registry: *<%= ENV["MRSK_REGISTRY"] || 'internal' %>