Skip to content

Instantly share code, notes, and snippets.

View ondrajz's full-sized avatar

Ondrej Fabry ondrajz

View GitHub Profile
@ondrajz
ondrajz / README.md
Last active January 26, 2021 19:24
Access Remote Kubernetes Clusters Locally

Access Remote Clusters Locally

Following guide will allow you to run any kubectl commands on your local machine to access clusters running remotely (on AWS.. etc) without need to setup any public access to the cluster.

How?

Instead of ssh-ing into remote host to run kubectl commands you can use SSH port forwarding for the port on the remote cluster where your Kubernetes API is listening and use same kubeconfig as the one on the remote machine.

What if I run local clusters too?

@ondrajz
ondrajz / go.md
Last active December 29, 2019 10:44
Go

Go

List

# List all files in main module
go list -deps -f '{{if .Module}}{{if .Module.Main}}{{with $pkg := .}}{{range $file := $pkg.GoFiles}}{{printf "%v/%v\n" $pkg.Dir $file}}{{end}}{{end}}{{end}}{{end}}' 
@ondrajz
ondrajz / user.js
Created November 28, 2017 22:12
Github HideFiles
// ==UserScript==
// @name Github HideFiles
// @namespace http://tampermonkey.net/
// @version 0.1
// @description hide files
// @author TrueFurby
// @match https://github.com/*
// @grant none
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
@ondrajz
ondrajz / html_section.md
Created November 24, 2017 08:37
HTML of the section where the issue occurs

StylishThemes/GitHub-Dark#560

<table class="pricing-table pricing-table-responsive f5 mb-5">
  <thead>
    <tr>
      <th></th>
      <th class="text-normal border-left bg-gray-light f4">
        <a href="/pricing/developer">Developer</a>
 
@ondrajz
ondrajz / README.md
Last active March 9, 2020 17:19
UserScript: Github Links to Star Badges

preview

@ondrajz
ondrajz / server-status.sh
Last active January 3, 2018 09:30
Server Status to Slack
#!/bin/bash
# ==================================================================
#
# server-status.sh
#
# Retrieves current status of the server and sends it to Slack.
#
# https://github.com/TrueFurby/f48cc2acb58370bd1109ec55c9820439
#
@ondrajz
ondrajz / [regexp] replace github links
Last active June 27, 2017 01:21
Links to Github repos with stars
@ondrajz
ondrajz / gist:b1a6a48d643a5b99f851e4f8ed5a8fb0
Created February 17, 2017 06:36
javascript dateToString
function dateToString(d) {
var D = d.getDate().toString().replace(/^(\d)$/, '0$1');
var M = (d.getMonth() + 1).toString().replace(/^(\d)$/, '0$1');
var Y = d.getFullYear();
var h = d.getHours().toString().replace(/^(\d)$/, '0$1');
var m = d.getMinutes().toString().replace(/^(\d)$/, '0$1');
var s = d.getSeconds().toString().replace(/^(\d)$/, '0$1');
return '[' + Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s + ']';
}

Keybase proof

I hereby claim:

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

To claim this, I am signing this object: