Skip to content

Instantly share code, notes, and snippets.


Radek Gruchalski radekg

View GitHub Profile
radekg / Dockerfile
Created Jun 15, 2021
YugabyteDB multi-stage build
View Dockerfile
FROM centos:7.9.2009 as builder
RUN yum update -y && yum install -y wget curl \
&& wget${YB_VERSION}-linux.tar.gz -O /yugabyte-${YB_VERSION}-linux.tar.gz
FROM centos:7.9.2009
ARG GID=1060
ARG UID=1060
radekg / Certificates.go
Created Mar 24, 2021 — forked from Mattemagikern/Certificates.go
Create x509 certificate chain using Golang. Root CA, Designated CA, server CA
View Certificates.go
package main
import (
radekg / cloud.cfg
Created Mar 21, 2021 — forked from imduffy15/cloud.cfg
Cloud-init config example for using the none data source provider to setup a box for usage with vagrant on finding no cloud metadata service.
View cloud.cfg
disable_ec2_metadata: True
datasource_list: [ "ConfigDrive", "None"]
userdata_raw: |
groupadd vagrant
useradd -d /home/vagrant -s /bin/bash -m -g vagrant -G wheel vagrant
echo "root:vagrant" | chpasswd
radekg / lru.go
Last active Apr 11, 2021
Simple LRU
View lru.go
package main
import (
type item struct {
next *item
previous *item
radekg /
Last active Mar 12, 2018
Kubernetes notes

calico: hostname must be all lowercase

Calico requires the node name to be lowercase. Maybe that's obvious knolwedge but all other components have no problems handling uppercase characters. Error:

[root@k8s-kube-w-8djLQqtkAHJZvaOa centos]# docker ps -a
CONTAINER ID        IMAGE                                      COMMAND             CREATED              STATUS                     PORTS               NAMES
327fa0492135                        "start_runit"       3 seconds ago        Exited (1) 2 seconds ago                       k8s_calico-node_calico-node-k257k_kube-system_24149352-2567-11e8-94a0-02c64064058a_3
994fe7650e97                         "/"   41 seconds ago       Up 40 seconds                                  k8s_install-cni_calico-node-k257k_kube-system_24149352-2567-11e8-94a0-02c64064058a_0
94122e279a5a   "/pause"            About a minute ago   Up About a 
radekg /
Created Dec 7, 2017 — forked from stevenringo/
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description

View gist:91a8468fc6b26de7420b243b617e55af
Always, always, always generate your own SSH moduli.
notyourwork 4 hours ago [-]
For those uninformed you should expand on this to. It is a great suggestion but a statement like this to a uninformed isn't very helpful.
radekg /
Last active Apr 13, 2017
Java AsyncUtil.eventually(...) tests
package com.gruchalski.testing;
import java.util.UUID;
import java.util.concurrent.*;
import static;
public class AsyncUtil {
protected AsyncUtil() {}
radekg / .spacemacs
Last active Aug 16, 2016
Emacs for lispy stuff
View .spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
;; Base distribution to use. This is a layer contained in the directory
radekg /
Last active Jan 19, 2016
Marathon infra helpers

Get mesos working directory from config:

WORKING_DIR=$(cat /etc/mesos-slave/mesos.conf | grep '\-\-work_dir' | awk -F'=' '{print $2}')

Get current slave ID:

SLAVE_ID=$(basename $(readlink $WORKING_DIR/meta/slaves/latest))

Get Marathon ID: