Skip to content

Instantly share code, notes, and snippets.


Christoph Champ christophchamp

View GitHub Profile
patrick0057 /
Last active Oct 2, 2020
Rancher 2.x lazy ssh

lssh function


  • 06.03.2020 - added zsh function that works for WSL
  • 04.21.2020 - updated mac os x code to work with zsh and improved instructions.
  • 01.02.2020 - added Windows Subsystem for Linux and broke out each OS into its own section for easy copy and paste
  • 12.10.2019 - added support for Rancher 1.6 tar.gz files (requires gtar on mac)
  • 12.06.2019 - made command lazier by not requiring user to paste the IP.


Quick bash function to make my life easier when sshing into Rancher nodes. Make sure to update your default web browser download directory by modifying line 2 of the script. For mac: brew install findutils

janeczku /
Last active Jun 3, 2021

Follow these steps to update the SSL certificate of the ingress in a Rancher High Availability installation or switch from the default self-signed to a custom certificate:

  1. Create or update the tls-rancher-ingress k8s secret resource with the new certificate and private key
  2. Create or update the tls-ca k8s secret resource with the root CA certificate (only required when using a private CA)
  3. Update Rancher installation using Helm CLI
  4. Reconfigure Rancher Agents to trust the new CA certificate

Detailed steps

1. Create/Update the certificate secret resource

ShawnHymel / GridEYE_LEDs.ino
Created May 2, 2018
Demo of the Grid-EYE IR sensor using an LED array
View GridEYE_LEDs.ino
* GridEye LED Array Demo
* Author: Shawn Hymel (SparkFun Electronics)
* Date: May 1, 2018
* Displays a heat map of what the GridEye sees (8x8 pixels).
* Required Components
* - Arduino:
* - Qwiic Shield:
View make-sounds.html
<!DOCTYPE html>
<div>Frequence: <span id="frequency"></span></div>
<script type="text/javascript">
var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
var oscillatorNode = audioCtx.createOscillator();
var gainNode = audioCtx.createGain();
so0k /
Last active Jul 26, 2021
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
fntlnz /
Last active Jul 27, 2021
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
imjasonh / markdown.css
Last active Jun 10, 2021
Render Markdown as unrendered Markdown (see
View markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
ehazlett /
Created Jul 25, 2011
Search PubMed with BioPython
#!/usr/bin/env python
# numpy and biopython are required -- pip install numpy biopython
from Bio import Entrez
from Bio import Medline
TERM = 'Tuberculosis'
print('Getting {0} publications containing {1}...'.format(MAX_COUNT, TERM))
michiel / cors-nginx.conf
Created Jul 5, 2011
Wide-open CORS config for nginx
View cors-nginx.conf
# Wide-open CORS config for nginx
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
fweez /
Created Jun 27, 2011
A Benford's law bucketizer on file sizes in a directory
#!/usr/bin/env python
import os
import subprocess
# First, build up the results file. it'll have the form:
# 110 vidioc-g-dv-preset.xml
linecount_cmd = "rm results; for i in *; do find $i -execdir wc -c '{}' \; " + \
">> results; done;"