Skip to content

Instantly share code, notes, and snippets.

@rafzei
rafzei / ctr-commands.txt
Created January 24, 2022 10:58
ctr commands
# List images in k8s
ctr --namespace k8s.io image list
# Create etcd snapshot
ctr --namespace k8s.io \
run \
--mount type=bind,src={{ backup_temp_dir.path }}/,dst=/backup/,options=rbind:rw \
--net-host \
--env ETCDCTL_API=3 \
--rm "{{ etcd_image_name.stdout | trim }}" \
@rafzei
rafzei / date.py
Last active April 24, 2022 08:01
Simple python date with timezone
from datetime import datetime
import pytz
def set_timezone():
timezone = pytz.timezone("Europe/Warsaw")
return timezone
print(datetime.now(tz = set_timezone()))
@rafzei
rafzei / sources.list_22.04
Created April 24, 2022 08:04
Repositories for Ubuntu (21.04, 22.04)
# deb cdrom:[Ubuntu 21.04 _Hirsute Hippo_ - Release amd64 (20210420)]/ hirsute main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://sk.archive.ubuntu.com/ubuntu/ jammy main restricted
# deb-src http://sk.archive.ubuntu.com/ubuntu/ hirsute main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://sk.archive.ubuntu.com/ubuntu/ jammy-updates main restricted