Skip to content

Instantly share code, notes, and snippets.

@michael34435
michael34435 / get_kubeconfig_custom_cluster_rancher2.sh
Created October 19, 2018 06:36 — forked from superseb/get_kubeconfig_custom_cluster_rancher2.sh
Get kubeconfig for custom cluster in Rancher 2.0
#!/bin/bash
# Usage: ./get_kubeconfig_custom_cluster_rancher2.sh cluster_name
# Needs to be run on the server running `rancher/rancher` container
# Check if jq exists
command -v jq >/dev/null 2>&1 || { echo "jq is not installed. Exiting." >&2; exit 1; }
# Check if clustername is given
if [ -z "$1" ]; then
echo "Usage: $0 [clustername]"
@michael34435
michael34435 / 0_reuse_code.js
Created April 12, 2017 03:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@michael34435
michael34435 / gce-vpn-install.sh
Last active July 24, 2017 02:45 — forked from greenido/gce-vpn-install.sh
Installing vpn on GCE
#!/bin/sh
#
# Automatic configuration of a VPN on GCE debian-7-wheezy server.
# Tested only on debian-7-wheezy.
#
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
# Unported License: http://creativecommons.org/licenses/by-sa/3.0/
#
# Thx to: https://github.com/sarfata/voodooprivacy/blob/master/voodoo-vpn.sh for the code/idea
#
<!DOCTYPE html>
<html id="play">
<head>
<title>Bling Bling</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
var m = require('mraa'); //IO Library
var express = require('express')
var app = express();
var exec = require('sync-exec');
app.use(express.static('static'));
var blinkInterval = 1000; //set default blink interval to 1000 milliseconds (1 second)
var blinkStatus = false;
var ledState = 1; //set default LED state
var point_Alpha = 0 ;