Skip to content

Instantly share code, notes, and snippets.

View troy0820's full-sized avatar
💭
Thinking of a master plan....... 'Cause ain't nothin' but sweat inside my hand

Troy Connor troy0820

💭
Thinking of a master plan....... 'Cause ain't nothin' but sweat inside my hand
View GitHub Profile
@troy0820
troy0820 / kind-kubernetes-metrics-server.md
Created July 14, 2021 23:20 — forked from sanketsudake/kind-kubernetes-metrics-server.md
Running metric-server on Kind Kubernetes

I have created a local Kubernetes cluster with kind. Following are changes you need to get metric-server running on Kind.

Deploy latest metric-server release.

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.0/components.yaml

Within existing arguments to metric-server container, you need to add argument --kubelet-insecure-tls.

#!/usr/bin/env bash
set -e
files=$(find . -name ".editorconfig" ! -path './vendor/*')
gitfiles=$(git diff --cached --name-only)
if [[ "${files}" == "./.editorconfig" ]]; then
echo -e "\033[032m.editorconfig file exists \033[0m"
for f in $gitfiles
do
const announcementTime = new Date()
const tooEarly = new Date("2020-02-24T04:30:00.001Z")
console.log(formatTime(announcementTime, tooEarly))
function formatTime(announcementTime, tooEarly) {
const formattedTime = new Date(tooEarly.getTime() + announcementTime.getTimezoneOffset() * 60 * 1000)
return `At ${announcementTime} Steve said that ${formattedTime.getHours()}:${formattedTime.getMinutes()} is to early`;
}

Keybase proof

I hereby claim:

  • I am troy0820 on github.
  • I am troy0820 (https://keybase.io/troy0820) on keybase.
  • I have a public key ASDeqBqKZJ6Cx6qLPi8xPezOVzydknZg_ZClFqbl7MQHaAo

To claim this, I am signing this object:

package main
import (
"fmt"
"io"
"net/http"
"os"
)
//Create headers struct to inject into request
'use strict';
//command line app 3 digit number try to guess
//perfect good bad
//-d number of digits prompt user for answer
const program = require('commander');
const promptly = require('promptly');
program
.version('0.0.1')
#!/usr/bin/env bash
set -e
files=$(git diff --cached --name-only)
for f in $files
do
if [ -e "$f" ] && [[ $f == *.tf ]]; then
#terraform validate `dirname $f`
terraform fmt $f
# Use https instead of git and git+ssh
[url "https://github.com/"]
insteadOf = git://github.com/
[url "https://github.com/"]
insteadOf = git@github.com:
# Use git and git+ssh instead of https
[url "git://github.com/"]
insteadOf = https://github.com/
[url "git@github.com:"]
promise.promisifyAll(geocode);
var getzips = function(lat,lng) {
return new promise(function(resolve, reject) {
geocode.reverseGeocodeAsync(lat,lng)
.then(function(data) {
var zips = data.results[0].address_components[6].short_name;
resolve(zips);
})
})
var getzips = function(lat, lng) {
return new Promise((resolve, reject) => {
geocode.reverseGeocode(lat, lng, (err, data) => {
if (err) { reject(err); }
var result = data.results[0].address_components[6].short_name;
resolve(result);
});
});
};