Skip to content

Instantly share code, notes, and snippets.

View danielepolencic's full-sized avatar
💭
☸️

Daniele Polencic danielepolencic

💭
☸️
View GitHub Profile
@danielepolencic
danielepolencic / k8ssgug.md
Created March 29, 2019 00:25
Kubernetes meetup Singapore — 28th of March

You can find the 184 slides here http://bit.ly/2UiIAmp

If you wish to know more about networking in Kubernetes, you can have a look at the end-to-end journey of a request in Kubernetes here http://bit.ly/2CSWKkv

Keep in touch! You can drop me an email at [daniele at learnk8s.io] or connect on LinkedIn at http://bit.ly/2FGjaqG

Lastly, if you want to chat Kubernetes over lunch, drop me a note and I'll come and visit you. I just moved to Singapore and I only know very few people. It'd be nice to know what you're up to.

@danielepolencic
danielepolencic / kubeadm.rb
Created August 10, 2018 19:52
Creating a 3 node cluster with kubeadm and Vagrant
BOX_IMAGE = "bento/ubuntu-16.04"
KUBERNETES_VERSION = "stable-1.10"
KUBEADM_VERSION = "1.10.3-00"
FLANNEL_VERSION = "v0.9.1"
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |v|
v.memory = 1024
v.cpus = 1
end
@danielepolencic
danielepolencic / README.md
Last active April 20, 2024 21:50
Create 3 nodes Kubernetes cluster locally with Vagrant

3 Virtual Machines Kubernetes cluster

Dependencies

You should install VirtualBox and Vagrant before you start.

Creating the cluster

You should create a Vagrantfile in an empty directory with the following content:

@danielepolencic
danielepolencic / huginn.ts
Created April 16, 2018 14:39
Crunch tweets on Huginn
var Agent = {} as any;
interface ITweet {
urls: string[]
text: string
id: string
timestamp: number
media: string[]
user: string
}
@danielepolencic
danielepolencic / huginn-mercury.md
Created April 14, 2018 19:43
Mercury rewrite in Ruby for Huginn

Mercury Huginn

The following code sort of work app/models/agents/mercury_agent.rb:

module Agents
  class MercuryAgent < Agent
    include WebRequestConcern

    can_dry_run!
@danielepolencic
danielepolencic / maybe.ts
Created March 11, 2017 10:05
Maybe in Typescript
export class HKT<F, A> {
private f: F;
private a: A;
}
export class IsMaybe {
private maybe: 'MAYBE';
}
export type MaybeV<T> = T | void | null;

Keybase proof

I hereby claim:

  • I am danielepolencic on github.
  • I am danielepolencic (https://keybase.io/danielepolencic) on keybase.
  • I have a public key whose fingerprint is DC04 7538 F482 8262 FC89 248D 857E CB05 FF2F 3EDB

To claim this, I am signing this object:

@danielepolencic
danielepolencic / rotate.sh
Created February 29, 2016 09:36
Rotate videos (container only)
#!/bin/bash
shopt -s nullglob
mov=( IMG_5097 IMG_5102 IMG_5136 IMG_5142 IMG_5158 IMG_5198 IMG_5230 IMG_5231 IMG_5296 IMG_5318 IMG_5323 IMG_5330 IMG_5339 IMG_5348 IMG_5370 IMG_5376 IMG_5380 IMG_5381 IMG_5450 IMG_5451 IMG_5491 IMG_5519 IMG_5536 IMG_5759 )
for f in "${mov[@]}"
do
echo "Processing $f"
ffmpeg -i "${f}.mov" -c copy -metadata:s:v:0 rotate=-90 "${f}_rot.mp4"
rm -rf "${f}.mov"
mv "${f}_rot.mp4" "${f}.mp4"
done