Skip to content

Instantly share code, notes, and snippets.

type Foo struct {
value []string
}
func (f *Foo) String() string {
return ""
}
func (f *Foo) Set(s string) error {
f.value = append(f.value, s)
@apokalyptik
apokalyptik / encrypt.go
Created September 1, 2014 22:38
Go RSA public key encryption example. Compatible with http://us3.php.net/manual/en/function.openssl-private-decrypt.php for decryption
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"fmt"
"io/ioutil"
"log"
@apokalyptik
apokalyptik / init.lua
Created March 16, 2023 17:56
My NVIM configuration
-- Install packer
local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
local is_bootstrap = false
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
is_bootstrap = true
vim.fn.system { 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path }
vim.cmd [[packadd packer.nvim]]
end
@apokalyptik
apokalyptik / debian-jessie-kubernetes-1.3-manual-install-guide.md
Last active November 21, 2023 12:31
Set up Kubernetes on 3 Debian Jessie virtual machines -- No magic

The Goal

Set up Kubernetes on 3 Debian Jessie virtual machines: One master. Two nodes. Additionally do this without any "magic" so that what is required to be running to make everything work is plain and obvious.

We will be using flannel for the inter-machine networking layer. Mainly because it is useful and it seems to be pretty popular.

The Setup