Skip to content

Instantly share code, notes, and snippets.

View nicolaballotta's full-sized avatar
🏠
Working from home

Nicola Ballotta nicolaballotta

🏠
Working from home
View GitHub Profile

I have been an aggressive Kubernetes evangelist over the last few years. It has been the hammer with which I have approached almost all my deployments, and the one tool I have mentioned (shoved down clients throats) in almost all my foremost communications with clients, and it was my go to choice when I was mocking my first startup (saharacluster.com).

A few weeks ago Docker 1.13 was released and I was tasked with replicating a client's Kubernetes deployment on Swarm, more specifically testing running compose on Swarm.

And it was a dream!

All our apps were already dockerised and all I had to do was make a few modificatons to an existing compose file that I had used for testing before prior said deployment on Kubernetes.

And, with the ease with which I was able to expose our endpoints, manage volumes, handle networking, deploy and tear down the setup. I in all honesty see no reason to not use Swarm. No mission-critical feature, or incredibly convenient really nice to have feature in Kubernetes that I'm go

@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.

@skinny
skinny / gist:2a628a991b1a3b46253c
Created November 11, 2015 21:12
cloud-config-template
#cloud-config
write_files:
- path: /opt/bin/curl-retry.sh
permissions: '0755'
owner: root
content: |
#!/bin/sh -x
until curl $@
do sleep 1
@scole-scea
scole-scea / systemd-reload.service
Last active August 29, 2015 14:17
Systemd reload hack for fleet
[Unit]
Description=Systemd Reload Hack for coreos fleet
After=fleet.service
# So: comments outside the script part itself, so I don't exceed
# command line length.
#
# The point here is to detect services which are stuck in "not-found"
# state when they shouldn't be. This failure originates from
# fleet-submitted unit files, so we try hard not to affect units