Skip to content

Instantly share code, notes, and snippets.

Petr Michalec epcim

View GitHub Profile
@epcim
epcim / dhcpd.conf
Created Jan 16, 2019 — forked from robinsmidsrod/dhcpd.conf
Trying to chainload iPXE with full feature set from a lesser featured one, whilst still being able to boot non-supported cards with UNDI
View dhcpd.conf
ddns-update-style none;
deny bootp; #default
authoritative;
include "/etc/dhcp/ipxe-option-space.conf";
# GREEN (private network)
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.100 10.1.1.199;
option subnet-mask 255.255.255.0;
@epcim
epcim / _INSTALL.md
Created Jan 16, 2019 — forked from robinsmidsrod/_INSTALL.md
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)
View _INSTALL.md

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@epcim
epcim / etcd.sh
Created Jan 8, 2019
etcd operations
View etcd.sh
etcdctl --endpoints https://master-0:2379 --ca-file /etc/kubernetes/secrets/etcd-client-ca.crt --cert-file /etc/kubernetes/secrets/etcd-client.crt --key-file /etc/kubernetes/secrets/etcd-client.key cluster-health
ETCDCTL_API=3 etcdctl --endpoints https://master-0:2379 --cacert /etc/kubernetes/secrets/etcd-client-ca.crt --cert /etc/kubernetes/secrets/etcd-client.crt --key /etc/kubernetes/secrets/etcd-client.key endpoint health
ETCDCTL_API=3 etcdctl --endpoints https://master-0:2379 --cacert /etc/kubernetes/secrets/etcd-client-ca.crt --cert /etc/kubernetes/secrets/etcd-client.crt --key /etc/kubernetes/secrets/etcd-client.key get --keys-only --prefix /registry
View libvirt_kvm.rst

Using Libvirt and KVM

Installation

Install required packages
apt-get install qemu-kvm libvirt-bin bridge-utils virtinst
@epcim
epcim / setup_git_diff_like_a_pro.md
Last active Nov 28, 2018
vimdiff diff dirdiff git
View setup_git_diff_like_a_pro.md
@epcim
epcim / netstat.sh
Created Nov 21, 2018
osx networking
View netstat.sh
lsof -iTCP -sTCP:LISTEN -iUDP -n -P
lsof -iTCP -sTCP:LISTEN -n -P
@epcim
epcim / vscode_extensions.sh
Created Nov 3, 2018
vscode extensions migration
View vscode_extensions.sh
ssh 192.168.96.93 -c "code --list-extensions | xargs -L 1 echo code-insider --install-extension"
@epcim
epcim / apfs_volume.sh
Last active Nov 5, 2018
apfs osx apple customization behaviour diskutil config keyboard
View apfs_volume.sh
diskutil apfs addVolume disk1 APFS Steam
ln -s /Volumes/Steam ~/Library/Application\ Support/Steam
@epcim
epcim / get_server_cert.sh
Created Oct 22, 2018
Get server certificate, curl + openssl
View get_server_cert.sh
#!/bin/bash
export SERVER=${SERVER:-localhost}
echo | openssl s_client -showcerts -servername $SERVER -connect $SERVER:443 2>/dev/null | openssl x509 -inform pem -noout -text
You can’t perform that action at this time.