- For OpenSUSE, install the RPM package from CLoudflare for CentOS using zypper. When asked, type
2
. - For Fedora, not tested yet
Copy warp-svc.service
file to /etc/systemd/system/
, then enable in systemd using this command:
func (s balanceStorage) ChangeBalance(ctx context.Context, userID int64, amount int64, desc string) error { | |
// acquire connection | |
c, err := s.pool.Acquire(ctx) | |
if err != nil { | |
return errors.NewInternal(err, "acquire connection") | |
} | |
defer c.Release() | |
// begin transaction | |
tx, err := c.Begin(ctx) |
package storages | |
import ( | |
"context" | |
"math/rand" | |
"testing" | |
"github.com/golang/mock/gomock" | |
"github.com/google/uuid" | |
"github.com/illiafox/saga-shop/api/apptrace" |
yay -S qemu-user-static
).
pcre-static
and update PGP keys (follow the tips in the comments here).systemd-binfmt
, the revamped version of binfmt-support
tools
systemd-binfmt
unit (systemctl status systemd-binfmt
) and (re)start if needed (sudo systemctl restart systemd-binfmt
)
sudo mount /dev/sdb2 arm_mountpoint
)/usr/bin/qemu-arm-static
on my distro) to the mounted root directory's usr/bin
Problem: you enabled ufw on your RaspberryPi or OrangePi, but forgot to open the 22 port (rookie mistake)
Solution: manually edit ufw rules
/etc/ufw/user.rules
### tuple ### allow any 22 0.0.0.0/0 any 0.0.0.0/0 in
-A ufw-user-input -p tcp --dport 22 -j ACCEPT
#include <stdio.h> | |
void bubbleSort(const int n, int** arr) { | |
int boundary = n - 1; | |
while (boundary > 0) { | |
int lastSwap = 0; | |
for (int i = 0; i < boundary; i++) { | |
if (arr[n-i][i] > arr[n-i][i + 1]) { | |
const int temp = arr[n-i][i]; |
Backup your databases
docker exec -t your-db-container pg_dumpall -c -U postgres > dump_`date +%Y-%m-%d"_"%H_%M_%S`.sql
or dump only needed tables
docker exec -t your-db-container pg_dump -c -U test_user --table mytable1 --table mytable12 postgres > dump_`date +%Y-%m-%d"_"%H_%M_%S`.sql
server: | |
http_listen_port: 10080 | |
grpc_listen_port: 0 | |
positions: | |
filename: /tmp/positions.yaml | |
clients: | |
- url: "http://localhost:9428/insert/loki/api/v1/push" | |
scrape_configs: | |
- job_name: containers | |
docker_sd_configs: |