Skip to content

Instantly share code, notes, and snippets.

View harrytang's full-sized avatar

Harry Tang harrytang

View GitHub Profile
@harrytang
harrytang / config-k8s.sh
Created February 28, 2023 08:23
config-k8s
#!/usr/bin/env bash
set -e
SNAP_DATA=/var/snap/microk8s/current
SNAP=/snap/microk8s/current
CONFIG_DIR=/var/snap/microk8s/current/args
source ${SNAP}/actions/common/utils.sh
# update the kube-apiserver
refresh_opt_in_local_config "enable-admission-plugins" "PodNodeSelector" kube-apiserver
refresh_opt_in_local_config "feature-gates" "IPv6DualStack=true,StatefulSetMinReadySeconds=true" kube-apiserver
@harrytang
harrytang / event-notification.eml
Last active April 25, 2022 13:38
Email template
<!DOCTYPE html>
<html style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>{{object}}: {{event}}</title>
<style type="text/css">
img {
max-width: 100%;
}

MacOS: Disable Device Enrollment Notification

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@harrytang
harrytang / outline-server-setup.md
Created March 18, 2020 20:22 — forked from hadisfr/outline-server-setup.md
How to setup an Outline VPN Server on Ubuntu 16.04

How to setup an Outline VPN Server on Ubuntu 16.04 Server

This guide will show you how to install Outline Server on an Ubuntu 16.04 Server and use Outline Manager.

Install Outline Manager

Outline Manager supports Windows, macOS and Linux.

Outline Manager for Windows

@harrytang
harrytang / script.js
Created January 31, 2020 06:57
thoa exercise
function calCulate(time) {
var time = parseInt(document.getElementById("day").value);
//const yearDay = 365;
//const monthDay = 30;
//const weekDay = 7;
var year = 0,
month = 0,
week = 0,
day = 0;
@harrytang
harrytang / .eslintrc.js
Created December 14, 2019 17:49
.eslintrc.js
module.exports = {
parser: "@typescript-eslint/parser",
extends: [
"react-app",
"prettier",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
plugins: ["@typescript-eslint", "react-hooks", "react"],
rules: {
{
"success":true,
"data":[
[
{
"q":"Cum quaerat alias ut atque ab error.",
"a":"At fuga neque recusandae voluptatem cum rerum excepturi. Dolorum id ullam cum alias asperiores. Quis voluptas eius voluptatem ipsam."
},
{
"q":"Totam eos repellendus iste eligendi laudantium voluptatem.",
@harrytang
harrytang / composer.json
Last active July 24, 2018 13:12
New composer.json
{
"name": "powerkernel/core",
"description": "Core API System",
"keywords": [
"yii2",
"api",
"core"
],
"homepage": "https://powerkernel.com",
"type": "project",
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<link href="https://refreshless.com/nouislider/distribute/nouislider.css?v=1110" rel="stylesheet">
<script src="https://refreshless.com/nouislider/distribute/nouislider.js?v=1110"></script>