Skip to content

Instantly share code, notes, and snippets.

View kyberorg's full-sized avatar

Aleksandr Muravja kyberorg

View GitHub Profile
@AHaymond
AHaymond / gist:25587a93094fdffdcdbfeaa90f21337c
Last active April 28, 2024 00:16
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
- $> pacman-key --refresh-keys -u --keyserver hkps.pool.sks-keyservers.net
*The use of the --keyserver flag is due to an error that currently occurs when using the default keyserver
3. Reinstall Arch keyring
- $> pacman -S archlinux-keyring
4. Install Yay (if desired)
- Create a user (you cannot run makepkg as root, you must be signed in as a user)
@kyberorg
kyberorg / grant.sql
Created July 24, 2020 12:53
MySQL Grant
GRANT ALL PRIVILEGES ON *.* TO 'toor'@'10.x.x.x' IDENTIFIED BY 'xxxxxpassword' WITH GRANT OPTION;
flush privileges;
@ruanbekker
ruanbekker / promtail_docker_logs.md
Last active April 29, 2024 22:18
Docker Container Logging using Promtail
@ilap
ilap / grafana_telegram_bot.md
Last active March 24, 2024 14:31
Grafana Telegram Alert

Config Telegrambot for grafana's alerts.

1. Create bot

Open Telegram and search for @BotFather user and message them the following:

You
/newbot 

BotFather
@radimih
radimih / Dockerfile
Last active April 20, 2023 10:53
Spring Boot Actuator based Docker HEALTHCHECK
FROM openjdk:11-jre-slim
EXPOSE 8080
ENV TZ=Europe/Moscow
RUN adduser --system --group --home /opt/app appuser
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl jq \
@dhb52
dhb52 / macos-ssh-lclocale-warning.md
Last active August 29, 2019 10:44
macOS ssh LC warning

解决 Mac Os X 升级之后出现 LC_CTYPE 警告问题 Mac 升级到 10.14 之后,登录远程 linux 服务器会出现如下错误:

warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

由于 mac ssh 连接的时候传递了 LANG 环境变量,此变量与服务器变量不一致,导致该问题发生。

解决方法,取消传递 LANG 环境变量:

@bradtraversy
bradtraversy / docker_wordpress.md
Last active May 4, 2024 09:16
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@kyberorg
kyberorg / mysql-docker.sh
Created December 19, 2018 09:30 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@mashingan
mashingan / sqlite3gorm.go
Last active August 20, 2023 16:04
Simple CRUD example working with Gorm
package main
import (
"fmt"
"net/http"
"strconv"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/sqlite"
"github.com/labstack/echo"
@kyberorg
kyberorg / installing-arch-linux-on-a-vultr-server.md
Last active September 7, 2018 13:05
Installing Arch Linux On a Vultr Server

Installing Arch Linux On a Vultr Server

This is a minimal installation guide targeted to get Arch Linux running on Vultr. For simplicity, 'time zone', 'hostname', 'locale' and 'initramfs' are omited, you can configure them latter by yourself.

Partition the disks

For simplicity, we use single root partition.

# fdisk /dev/vda