create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
# нужно поставить kubectl и kuebectx+kubens | |
kubectl get pod # Получить поды из текущего нейспейса | |
kubectl get pod -n <namespace > # Получить под из заданного неймспейса | |
kubectl exec -it {pod_name} bash # зайти внутрь контейнера с башем | |
kubectl logs {pod_name} # логи пода |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
This guide will enable systemd
to run as normal under WSL 2. This will enable services like microk8s
, docker
and many more to just work
during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.
To enable systemd
under WSL we require a tool called systemd-genie
Copy the contents of install-sg.sh
to a new file /tmp/install-sg.sh
:
cd /tmp
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '" | |
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
if( $found ){ | |
$remoteport = $matches[0]; | |
} else{ | |
echo "The Script Exited, the ip address of WSL 2 cannot be found"; | |
exit; | |
} |
Here I have 2 methods for running portainer on windows, a quick, preferred method only requiring a fairly recent version of docker, or a more complicated method to try if that does not work.
This setup will let you run Portainer on windows by using the host.docker.internal (docker.for.win.localhost
is depricated) endpoint.
Please note:
import click | |
@click.group() | |
def greet(): | |
pass | |
@greet.command() |
import click | |
@click.group() | |
def greet(): | |
pass | |
@greet.command() | |
def hello(**kwargs): |
# see https://www.blopig.com/blog/2016/08/processing-large-files-using-python/ | |
import multiprocessing as mp | |
import os | |
import re | |
from datetime import datetime, timedelta | |
RESULT_FILENAME = 'result.csv' | |
FILENAME_TEMPLATE ='log-{date}' | |
CHUNK_SIZE = 1024*1024 | |
log_pattern = re.compile(r'^SEVERITY.*(?<=first param in quotes\s")(.*)(?=").*(?<=second param\s)(\w+).*?(third param)?$') |
import secrets | |
import string | |
length = 0 | |
while(length < 1): | |
length = int(input("Input pass length: ")) | |
alphabet = string.ascii_letters + string.digits | |
password = ''.join(secrets.choice(alphabet) for i in range(length)) # for a 20-character password | |
print(password) |
'use strict'; | |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var browserSync = require('browser-sync').create(); | |
var header = require('gulp-header'); | |
var cleanCSS = require('gulp-clean-css'); | |
var rename = require("gulp-rename"); | |
var uglify = require('gulp-uglify'); | |
var pkg = require('./package.json'); |