Skip to content

Instantly share code, notes, and snippets.

View lastcoolnameleft's full-sized avatar

Tommy Falgout lastcoolnameleft

View GitHub Profile
@saiyam1814
saiyam1814 / k3supazure
Last active April 22, 2020 18:58
This is the gist for setting up k3s using k3sup on Azure
# Create 2 VMS and have the networking opend 22,80,443,6443 with user as app
# ssh into the instance that you want to make the master for k3s and Run Following commands. Alsocopy the key in /root/.ssh/id_rsa
# SERVER_IP = ip address of master vm
# AGENT_IP = ip address of worker vm
curl -sLS https://raw.githubusercontent.com/alexellis/k3sup/master/get.sh | sh
Export SERVER_IP=ipaddr
Export USER=app
Export AGENT_IP=ipaddr
k3sup install --ip $SERVER_IP --user $USER
export KUBECONFIG=`pwd`/kubeconfig
kubectl create ns istio-system
kubectl config set-context $(kubectl config current-context) --namespace=istio-system
alias h3='helm3'
h3 repo add istio https://storage.googleapis.com/istio-release/releases/1.1.7/charts/
h3 repo update
#install istio-cni
h3 upgrade --install istio-cni istio/istio-cni --set istio_cni.enabled=true
@thomasnorris
thomasnorris / Raspberry Pi Kiosk Setup.md
Last active October 22, 2023 03:36
Instructions for installing a fresh image of Raspbian and turning the Pi into a kiosk (for google slides, google photos, etc)

Raspberry Pi Kiosk Setup

  • Install a fresh image of Raspbian and boot the Pi
  • Go through the prompts to finish initial setup
  • Open a Termial window
    • Type sudo apt-get install unclutter
    • Type sudo raspi-config
      • Select Boot Options with Enter
        • Select Wait for Network at Boot with Enter
        • Select Yes with Enter
@simonswine
simonswine / kubectl_root_host.sh
Created May 29, 2018 16:23
nsenter into the host
kubectl run hack1 --restart=Never -t -i -n kube-system --image overridden --overrides '{"spec":{"hostPID": true, "containers":[{"name":"busybox","image":"alpine:3.7","command":["nsenter","--mount=/proc/1/ns/mnt","--","/bin/bash"],"stdin": true,"tty":true,"securityContext":{"privileged":true}}]}}' --rm --attach
@noelbundick
noelbundick / README.md
Last active June 14, 2018 20:56
acs-aks-migration
@DeanThompson
DeanThompson / haversine.py
Last active July 29, 2021 14:18
Haversine Formula in Python (Bearing and Distance between two GPS points)
from math import radians, cos, sin, asin, sqrt
def haversine(lon1, lat1, lon2, lat2):
"""
Calculate the great circle distance between two points
on the earth (specified in decimal degrees)
"""
# convert decimal degrees to radians
lon1, lat1, lon2, lat2 = map(radians, [lon1, lat1, lon2, lat2])
/**
* Simple userland CPU profiler using v8-profiler
* Usage: require('[path_to]/CpuProfiler').init('datadir')
*
* @module CpuProfiler
* @type {exports}
*/
var fs = require('fs');
var profiler = require('v8-profiler');
@PurpleBooth
PurpleBooth / README-Template.md
Last active April 22, 2024 11:45
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@branneman
branneman / better-nodejs-require-paths.md
Last active April 8, 2024 00:22
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions