Skip to content

Instantly share code, notes, and snippets.

View kyberorg's full-sized avatar

Aleksandr Muravja kyberorg

View GitHub Profile
@kyberorg
kyberorg / gist:26da3fdef90fb198261b4756efff9114
Last active November 1, 2023 05:34 — forked from AHaymond/gist:25587a93094fdffdcdbfeaa90f21337c
Setting up Arch Linux LXC on ProxMox
1. Edit the mirror list located at /etc/pacman.d/mirrorlist and uncomment a preferred mirror (preferrably closest to you)
2. Initialize Pacman GPG Keys
- $> pacman-key --init
- $> pacman-key --populate archlinux
3. Reinstall Arch keyring
- $> pacman -S archlinux-keyring
@kyberorg
kyberorg / Post-Put-Patch.txt
Last active November 12, 2022 20:26
API Endpoint Design Reference
POST: creation of a new thing, where the location (ID) of the new thing will be determined by the server. The response is expected to contain a Location header telling the client where the object ended up (POST-redirect-GET pattern).
PUT: creation of a new thing at a client-defined location (in cases where that's allowable), or replacement of the thing at a given location (this includes "updates" where the body being sent by the client is a complete representation of the object, just as you would get from a GET).
PATCH: in-place partial-update of the thing at a given location.
@kyberorg
kyberorg / gist:cd43650137f10655fb11127eee9d0f1e
Created August 10, 2022 10:20 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@kyberorg
kyberorg / export-node-stats.md
Created June 21, 2022 13:00 — forked from ScriptingSquirrel/export-node-stats.md
Setup prometheus-node-exporter and push stats to Pushgateway with cron job

(Assuming a Debian 8-like system)

  • Install prometheus-node-exporter

    $ sudo apt update && sudo apt install prometheus-node-exporter
  • Configure prometheus-node-exporter to expose metrics only to localhost, not on to all networks. Modify file /etc/default/prometheus-node-exporter:

    # Set the command-line arguments to pass to the server.
# Loki Config file
# based on https://github.com/grafana/loki/blob/master/cmd/loki/loki-docker-config.yaml
# Documentation: https://grafana.com/docs/loki/latest/configuration/
# The module to run Loki with. Supported values
# all, distributor, ingester, querier, query-frontend, table-manager.
# [target: <string> | default = "all"]
@kyberorg
kyberorg / nginx.service
Created April 22, 2022 09:33
Docker Compose Nginx as SystemD Service
[Unit]
Description=Nginx in Docker
After=docker.service network-online.target
Requires=docker.service network-online.target
[Service]
WorkingDirectory=/srv/nginx
Type=oneshot
RemainAfterExit=yes
@kyberorg
kyberorg / stacktrace.java
Created April 14, 2022 08:26
Vaadin 23 + Java 17: compile error
Caused by: com.vaadin.flow.server.ExecutionFailedException: Error occured during goal execution: Cannot invoke "java.lang.Class.isInterface()" because the return value of "org.reflections.Reflections.forClass(String, java.lang.ClassLoader[])" is nullPlease run Maven with the -e switch (or Gradle with the --stacktrace switch), to learn the full stack trace.
at com.vaadin.flow.plugin.base.BuildFrontendUtil.runNodeUpdater (BuildFrontendUtil.java:346)
at com.vaadin.flow.plugin.maven.BuildFrontendMojo.execute (BuildFrontendMojo.java:100)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java
@kyberorg
kyberorg / Dockerfile
Last active October 27, 2021 07:36
Amazon Java + Distroless Java + JLink
FROM amazoncorretto:11 as jreBuilder
RUN jlink \
--add-modules jdk.unsupported,java.sql,java.desktop,java.naming,java.management,java.instrument,java.security.jgss,java.rmi,jdk.management.agent,jdk.crypto.ec,jdk.crypto.cryptoki \
--verbose \
--strip-debug \
--compress 2 \
--no-header-files \
--no-man-pages \
--output /jre
@kyberorg
kyberorg / Dockerfile
Created October 22, 2021 07:42
Container Walker
FROM golang:1.17.2 as walker-build
WORKDIR /go/src/app
COPY cmd/walker.go cmd/walker.go
RUN GO111MODULE=off CGO_ENABLED=0 go install ./...
FROM your-image-here:tag as runner
COPY --from=walker-build /go/bin/cmd /app/walker
ENTRYPOINT ["/app/walker"]
@kyberorg
kyberorg / libinput-gestures.conf
Last active June 3, 2021 10:43
Scrolling KDE Virtual Desktops with 3 fingers gesture to left-right
gesture swipe down 3 qdbus org.kde.kglobalaccel /component/kwin invokeShortcut "Switch One Desktop Up"
gesture swipe up 3 qdbus org.kde.kglobalaccel /component/kwin invokeShortcut "Switch One Desktop Down"
gesture swipe right 3 qdbus org.kde.kglobalaccel /component/kwin invokeShortcut "Switch One Desktop to the Left"
gesture swipe left 3 qdbus org.kde.kglobalaccel /component/kwin invokeShortcut "Switch One Desktop to the Right"