Skip to content

Instantly share code, notes, and snippets.

View bot11's full-sized avatar

Ramakrishna Deepak Battu bot11

  • Sydney, Australia
View GitHub Profile
@mcastelino
mcastelino / Kube-dns.md
Last active June 20, 2022 08:48
kubernetes kube-dns components, debugging

Summary

  • dnsmasq front ends the requests and sends them on to kube-dns

    dnsmasq
      --cache-size=1000
      --no-resolv
      --server=127.0.0.1#10053
    

--log-facility=-

@bearfrieze
bearfrieze / comprehensions.md
Last active December 23, 2023 22:49
Comprehensions in Python the Jedi way

Comprehensions in Python the Jedi way

by Bjørn Friese

Beautiful is better than ugly. Explicit is better than implicit.

-- The Zen of Python

I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.

@cemeyer
cemeyer / Migrate VMware workstation to qemu+kvm
Last active June 27, 2019 23:18
Steps to migrate a VMware VM to KVM
1) Deleted all vmware snapshots for the VM. sync. sync.
2) Followed rwmj's guide to setting up a br0 device for libvirt in Fedora.[0]
3) Grabbed vmware2libvirt[1] from Ubuntu (it's just a standalone python script) and
used it with --bridge br0 -f foo.vmx > foo.xml.
4) Converted my vmdk to raw with qemu-img[2], moved it to /var/lib/libvirtd per
instructions[3]
5) Edited my xml to point to the right disk, use the qemu/raw driver, use the right
path for kvm (/usr/bin/qemu-kvm on Fedora).
5.a) Configure a unix socket serial device (like VMware's "pipe" mode):
@flomotlik
flomotlik / gist:6212725
Last active November 13, 2017 18:46
Wget Curl comparison and our Approach

We have changed our check_url implementation from curl to wget for three reasons

  1. It gives us the ability to retry on connection refused. Compare the command we used previously with curl:
curl -sSfL --retry 3 URL

to the current one: