Skip to content

Instantly share code, notes, and snippets.

@yasker
yasker / gist:c3bddb4aa9c68f2ede457dd2b0860216
Created May 29, 2020 17:48
Solving GitHub PR conflict via rebase (only available to write permission)
1. Update repo to the latest
```
git checkout master
git pull --rebase
```
2. Use the command line shows in GitHub page to get the local copy of the PR
```
git checkout -b yasker-work yasker-work
git pull https://github.com/yasker/website.git work
```
@yasker
yasker / k3s-csi-debug.patch
Created March 29, 2019 22:37
k3s csi debug
Author: Sheng Yang <sheng@yasker.org>
Date: Fri Mar 29 13:42:21 2019 -0700
Debug csi
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_plugin.go b/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_plugin.go
index 4b121d4..055b7c0 100644
--- a/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_plugin.go
+++ b/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_plugin.go
@@ -21,6 +21,7 @@ import (
@yasker
yasker / volume_pv_provisioner_compare.csv
Last active October 11, 2018 19:17
Volume, PV, and Provisioner comparsion
Name Volume PersistentVolume Provisioner
AWSEBS
AzureDisk
AzureFile
CephFS
Cinder
FiberChannel
Flexvolume
Flocker
GCEPersistentDisk
@yasker
yasker / cleanup_completed_pods.sh
Created July 7, 2018 00:00
Kubernetes Toolbox
#!/bin/bash
# Script to clean up completed pods
# One line script as:
# kubectl ${ns_arg} get pod --field-selector "status.phase=Succeeded" -o=custom-columns=:.metadata.name | sed -n '1!p' |xargs kubectl ${ns_arg} delete pod
#
# $1 specified namespace
set -e
ns_arg=""
@yasker
yasker / presence-and-garage-door.groovy
Created March 8, 2017 05:22 — forked from fishy/presence-and-garage-door.groovy
SmartThings smartapp for garage door automation
/**
* Presence and Garage Door
*
* Copyright 2016 Yuxuan Wang
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@yasker
yasker / myq.groovy
Created March 8, 2017 05:22 — forked from fishy/myq.groovy
MyQ Garage SmartThings device handler
/**
* MyQ Garage Door
*
* Copyright 2017 Yuxuan Wang
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*