Skip to content

Instantly share code, notes, and snippets.

View clarkmcc's full-sized avatar

Clark McCauley clarkmcc

View GitHub Profile

Parse the kubernetes manifest in yaml or json, don't care a manifest type.

Examples:

package main

import (
	"bytes"
	"context"
@clarkmcc
clarkmcc / resilio.yaml
Last active October 31, 2021 11:36
A Kubernetes implementation of Resilio Sync
apiVersion: v1
kind: Namespace
metadata:
name: resilio
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: resilio-pv-volume
namespace: resilio
@frankfka
frankfka / iOSActivityRingSwiftUI.swift
Created April 29, 2020 05:22
iOS Activity Ring in SwiftUI
import SwiftUI
import PlaygroundSupport
extension Double {
func toRadians() -> Double {
return self * Double.pi / 180
}
func toCGFloat() -> CGFloat {
return CGFloat(self)
@miguelmota
miguelmota / rsa_util.go
Last active April 21, 2024 15:10
Golang RSA encrypt and decrypt example
package ciphers
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha512"
"crypto/x509"
"encoding/pem"
"log"
)