Skip to content

Instantly share code, notes, and snippets.

View beshkenadze's full-sized avatar

Aleksandr Beshkenadze beshkenadze

View GitHub Profile
@triangletodd
triangletodd / README.md
Last active May 7, 2024 05:22
k3s in LXC on Proxmox

On the host

Ensure these modules are loaded

cat /proc/sys/net/bridge/bridge-nf-call-iptables

Disable swap

sysctl vm.swappiness=0
swapoff -a
@ai
ai / cloudflare-matomo-worker.js
Last active March 28, 2024 19:11
Cloudflare worker to send statistics to Matomo
async function trackVisit (request, visitorId) {
let data = {
token_auth: 'secret',
country: request.headers.get('CF-IPCountry'),
urlref: request.referrer || request.headers.get('Referer'),
idsite: 1,
lang: request.headers.get('Accept-Language'),
apiv: 1,
rand: Math.random().toString(16).slice(2),
url: request.url,
@dmytrodanylyk
dmytrodanylyk / description.md
Last active June 20, 2022 15:00
Where this dependency comes from?

Did you ever have android build failed​ issue because of dependency resolution?

… or you were curious where all these old rxjava dependencies come from?

You can pretty easy track the module causing issues via following gradle command.

gradlew :root-module:dependencyInsight \
--configuration debugRuntimeClasspath \ // or debugCompileClasspath
--dependency io.reactivex:rxjava:1.1.0 > dependencies.txt // saves result to 'dependencies.txt' file
@afanjul
afanjul / install-docker-inside-lxc.txt
Last active June 14, 2023 18:08
Install Docker inside LXC container - Proxmox VE
1.Add “aufs” or “overlay” (or both) to /etc/modules-load.d/modules.conf in your PVE host and reboot. Check it with lsmod | grep -E 'overlay|aufs'
2.Use a LXC image with unprivilege features (you can check them here: https://uk.images.linuxcontainers.org/)
3.Create the container with unprivilege option, and “keyctl=1, nesting=1” features (Options section in proxmox).
4.Maybe you would want to mount an external point into /var/lib/docker (Resources section in proxmox)
5.Check this link (https://docs.docker.com/storage/storagedriver/overlayfs-driver/#configure-docker-with-the-overlay-or-overlay2-storage-driver) to change your storage-driver in docker to use aufs or overlay2.
6.Install portainer: https://portainer.readthedocs.io/en/latest/deployment.html
Voilá…
@pamolloy
pamolloy / README.md
Last active January 23, 2024 07:28
Ubiquiti USG configuration for Wireguard

Download the latest ugw3 package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb.

cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
@hadisfr
hadisfr / outline-server-setup.md
Last active March 25, 2024 12:17 — forked from okeehou/outline-server-setup.md
How to setup an Outline VPN Server on Ubuntu 16.04

How to setup an Outline VPN Server on Ubuntu 16.04 Server

This guide will show you how to install Outline Server on an Ubuntu 16.04 Server and use Outline Manager.

Install Outline Manager

Outline Manager supports Windows, macOS and Linux.

Outline Manager for Windows

@agrcrobles
agrcrobles / android_instructions_29.md
Last active October 22, 2023 12:09 — forked from patrickhammond/android_instructions.md
Setup Android SDK on OSX with and without the android studio

Hi, I am a fork from https://gist.github.com/patrickhammond/4ddbe49a67e5eb1b9c03.

A high level overview for what I need to do to get most of an Android environment setup and maintained on OSX higher Catalina and Big Sur with and without Android Studio been installed.

Considering the SDK is installed under /Users/<your_user>/Library/Android/sdk folder which is the Android Studio preferred SDK location, but it works fine under /usr/local/share/android-sdk as well, which is a location pretty much used on CI mostly.

Prerequisites:

https://github.com/shyiko/jabba instead ?

@cezaraugusto
cezaraugusto / gpg_fix.txt
Last active November 3, 2023 17:03
fixing `gpg failed to sign data` error on macOS
For troubleshooting, two things to first try:
run `git config --global gpg.program gpg2`, to make sure git uses gpg2 and not gpg
run `echo "test" | gpg2 --clearsign`, to make sure gpg2 itself is working
If that all looks all right, one next thing to try:
run `brew install pinentry` to ensure you have a good tool installed for passphrase entry
If after that install and you re-try git commit and still get the "failed to sign the data" error:
run `gpgconf --kill gpg-agent` to kill any running agent that might be hung
@nielsonsantana
nielsonsantana / dockerenter.sh
Last active July 5, 2022 13:35
Docker Shortcut to singin on docker container by name
#!/bin/bash
DOCKER_PS_LINE=`docker ps | awk '{print $1,$2,$NF}' | grep -m 1 $1`
CONTAINER_NAME=`echo $DOCKER_PS_LINE | awk '{print $2}'`
CONTAINER_ID=`echo $DOCKER_PS_LINE | awk '{print $1}'`
if [ -n "$CONTAINER_ID" ]; then
echo "Logged in: $CONTAINER_NAME"
docker exec -it $CONTAINER_ID bash
else
echo "No container found for query: '$1'"
@mihow
mihow / load_dotenv.sh
Last active May 4, 2024 12:32
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi