Skip to content

Instantly share code, notes, and snippets.

View jwsy's full-sized avatar
🇺🇸

Jason Yee jwsy

🇺🇸
View GitHub Profile
@jwsy
jwsy / setup_pandas_notebook.sh
Last active December 21, 2015 05:48
Install IPython, numpy, scipy, pandas, statsmodels, and scikit-learn on OSX 10.8 so I can run the code in LearnDataScience by @nborwankar (http://opendst.org/) Inspired by @westurner
#!/bin/sh
# Adapted from https://gist.github.com/westurner/3196564
# Package versions as of 9/14/2013, assumes that you've installed a virtualenv
setup_brew () {
if [ ! -f "/usr/local/bin/brew" ]; then
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
fi
@jwsy
jwsy / chocolatey.log
Created February 2, 2020 21:33
Chocolatey log
PS C:\Users\jyee> Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Getting latest version of the Chocolatey package for download.
Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.15.
Downloading 7-Zip commandline tool prior to extraction.
Extracting C:\Users\jyee\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\jyee\AppData\Local\Temp\chocolatey\chocInstall...
Installing chocolatey on this machine
Creating ChocolateyInstall as an environment variable (targeting 'Machine')
Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
WARNING: It's very likely you will need to close and reopen your shell
before you can use choco.
@jwsy
jwsy / Minikube start.log
Last active February 3, 2020 03:40
Minikube start
PS C:\Users\jyee> minikube start --cpus 4 --memory 4096
* minikube v1.6.2 on Microsoft Windows 10 Pro 10.0.18362 Build 18362
* Selecting 'hyperv' driver from existing profile (alternates: [virtualbox])
* Creating hyperv VM (CPUs=4, Memory=4096MB, Disk=20000MB) ...
* Preparing Kubernetes v1.17.0 on Docker '19.03.5' ...
* Downloading kubeadm v1.17.0
* Downloading kubelet v1.17.0
* Pulling images ...
* Launching Kubernetes ...
* Waiting for cluster to come online ...
@jwsy
jwsy / helm install.log
Created February 3, 2020 03:43
helm install
PS C:\Users\jyee> choco install kubernetes-helm
>>
Chocolatey v0.10.15
Installing the following packages:
kubernetes-helm
By installing you accept licenses for the packages.
Progress: Downloading kubernetes-helm 3.0.2... 100%
kubernetes-helm v3.0.2 [Approved]
kubernetes-helm package files install completed. Performing other installation steps.
@jwsy
jwsy / cert-manager install.log
Created February 3, 2020 03:50
cert-manager install
PS C:\Users\jyee> kubectl create namespace cert-manager
namespace/cert-manager created
PS C:\Users\jyee> kubectl apply --validate=false -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.12/deploy/manifests/00-crds.yaml
customresourcedefinition.apiextensions.k8s.io/certificaterequests.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/certificates.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/challenges.acme.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/clusterissuers.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/issuers.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/orders.acme.cert-manager.io created
@jwsy
jwsy / rancher install log.log
Last active February 5, 2020 11:24
rancher install log
PS C:\Users\jyee> helm repo add rancher-stable https://releases.rancher.com/server-charts/stable
"rancher-stable" has been added to your repositories
PS C:\Users\jyee> helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "rancher-stable" chart repository
...Successfully got an update from the "jetstack" chart repository
Update Complete. ⎈ Happy Helming!⎈
PS C:\Users\jyee> kubectl create namespace cattle-system
namespace/cattle-system created
PS C:\Users\jyee> helm install rancher rancher-stable/rancher --namespace cattle-system --set hostname=rancher.localdev
@jwsy
jwsy / machine.js
Created May 30, 2020 00:12
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: 'SWAPI',
initial: 'idle',
context: {
user: null
},
states: {
idle: {
on: {
FETCH: 'loading'
@jwsy
jwsy / Dockerfile
Created October 27, 2020 12:34
Dockerfile updated, add a script to show how to run sweethoney on files local to the host (vs. within the docker guest container)
FROM ubuntu
LABEL maintainer="Matthew Schwartz @schwartz1375"
USER root
ENV DEBIAN_FRONTEND=noninteractive
#RUN DEBIAN_FRONTEND=noninteractive \
RUN apt-get -y update && apt-get -y \
@jwsy
jwsy / k3d_rancher.ps1
Last active August 27, 2021 04:07
Script
# Default env vars
$env:CLUSTER_NAME="k3d-rancher"
$env:RANCHER_SERVER_HOSTNAME="rancher.localhost"
$env:KUBECONFIG_FILE="${env:CLUSTER_NAME}.yaml"
date
# Get kubectl and helm
choco list --local-only
choco install kubernetes-cli -y
choco install kubernetes-helm -y
@jwsy
jwsy / install_rancher.sh
Last active December 21, 2021 10:02
Script to install rancher on your macOS machine
#!/bin/bash -x
date
### 0. Install helm, kubectl (kubernetes-cli), and k3d with brew
brew install helm k3d kubectl
### 1. Create a cluster with k3d that connects port 443 to the loadbalancer provided by k3d
# Optionally install with more agents `--agents 3`
k3d cluster create k3d-rancher \
--api-port 6550 \