Skip to content

Instantly share code, notes, and snippets.

View nasermirzaei89's full-sized avatar
:octocat:
I Love Open Source

Naser Mirzaei nasermirzaei89

:octocat:
I Love Open Source
View GitHub Profile
@abdennour
abdennour / ingress-kube-apiserver.yaml
Created April 18, 2021 00:50
expose kube-apiserver thru ingress
kind: Ingress
metadata:
name: kubeapi
namespace: default
annotations:
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
rules:
- host: "api.devops.example.com"
@jgrahamc
jgrahamc / gist:3039800
Created July 3, 2012 13:51
Unique ID generator
id := make(chan string)
go func() {
h := sha1.New()
c := []byte(time.Now().String())
for {
h.Write(c)
id <- fmt.Sprintf("%x", h.Sum(nil))
}
}()
@sente
sente / formatXML.js
Last active April 4, 2024 12:20
javascript to format/pretty-print XML
The MIT License (MIT)
Copyright (c) 2016 Stuart Powers
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: