Skip to content

Instantly share code, notes, and snippets.

Michal Halenka HalisCz

Block or report user

Report or block HalisCz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am HalisCz on github.
  • I am haliscz (https://keybase.io/haliscz) on keybase.
  • I have a public key whose fingerprint is EF32 9B72 EFBB DB46 96A3 CC44 6D7D 57DE D18B B5BA

To claim this, I am signing this object:

@HalisCz
HalisCz / ssh-copy-id-exchange
Created Jun 29, 2017
Shell function to ssh into server and authenticate with old ssh key, and then add new ssh key into authorized_keys
View ssh-copy-id-exchange
ssh-copy-id-exchange() {
OLDKEY="/home/halis/.ssh/id_rsa-old"
OLDKEY_PUB="/home/halis/.ssh/id_rsa-old.pub"
NEWKEY="/home/halis/.ssh/id_rsa"
NEWKEY_PUB="/home/halis/.ssh/id_rsa.pub"
echo "Trying login with new key"
ssh -i $NEWKEY -o "PreferredAuthentications=publickey" $1 "true"
#exit if it successed
if [ $? -eq "0" ]; then
@HalisCz
HalisCz / how to sign keys after pgp signing
Last active Oct 8, 2018
what to do after pgp signing party
View how to sign keys after pgp signing
# create work dir
mkdir pgp-signing; cd pgp-signing
# fetch public keys from keyservers and export into .asc files
for mail in list
do
gpg2 --no-default-keyring --keyring=~/linuxdays.keyring --search-keys $mail
done
# run the PIUS signing script to sign keyring with key 0x12345 (https://www.phildev.net/pius/)
pius \
-H smtp.googlemail.com \
@HalisCz
HalisCz / ansible-vpsfree-kvm-alpine
Created Jan 2, 2018
Ansible playbook pro přípravu KVM hypervizoru ve vpsFree.cz na OS Alpine Linux
View ansible-vpsfree-kvm-alpine
---
- name: Instalace KVM na Alpine Linuxu #podle https://kb.vpsfree.cz/navody/vps/kvm#instalace_balicku_a_konfigurace_hypervizoru
block:
- name: install packages
apk: name={{ item }} state=latest
update_cache: yes
with_items:
- qemu-system-x86_64
- qemu-openrc
- qemu-img
View ansible workshop
# Home preparation
Because Ansible is unsupported to run from Windows boxes, and for the sake of unified environment during this workshop, we are going to use Vagrant and VirtualBox to create our testing environment. With Linux, MacOS or Windows, we will have the same environment.
## Tasks:
- get vagrant and virtualbox installed on your computer
- [Vagrant](https://www.vagrantup.com/)
- [VirtualBox](https://www.virtualbox.org/)
- download your vagrant boxes in advance by running:
```
View Vagrantfile
# -*- mode: ruby -*- vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "ubuntu" do |ubuntu|
ubuntu.vm.hostname = "ubuntu"
ubuntu.vm.box = "ubuntu/bionic64"
ubuntu.vm.network "private_network",
ip: "172.29.29.14"
ubuntu.vm.synced_folder "./data-ubuntu", "/vagrant_data", create: true
ubuntu.vm.provision "shell", inline: <<-SHELL
apt-get update
View lint-shell.yml
variables:
SHELLCHECK_SEVERITY: style
lint-shell:
tags: [kubernetes]
stage: prepare
image: koalaman/shellcheck-alpine
script:
# check with hard fail and customizable severity level
- find ./ -name '*.sh' -exec shellcheck --check-sourced --color=always --severity=${SHELLCHECK_SEVERITY} {} +
You can’t perform that action at this time.