I hereby claim:
- I am ben-z on github.
- I am benzhang (https://keybase.io/benzhang) on keybase.
- I have a public key whose fingerprint is C1E2 F7E1 7F23 A2FE C8C7 A7A7 9D94 E011 FF98 B78F
To claim this, I am signing this object:
<?php | |
/** | |
* Custom error handling for hhvm | |
* Implemented in EPSInventory-API(https://github.com/epsclubs/EPSInventory-API) on Jan 5, 2015 | |
* Referenced from: http://stackoverflow.com/questions/24524222/display-fatal-notice-errors-in-browser | |
*/ | |
// Usage: Call `set_error_handler(error_handler);` at the top of any php or hh file running on hhvm | |
set_error_handler(error_handler); |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> | |
<meta name="author" content="http://github.com/ben-z/"> | |
<meta name="license" content="ISC"> | |
<title>Log In</title> | |
<link rel="stylesheet" href="main.css"> | |
</head> | |
<body> |
I hereby claim:
To claim this, I am signing this object:
Install k3s master and expose api:
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --write-kubeconfig-mode 644 --bind-address 0.0.0.0" sh -
The --write-kubeconfig-mode 644
gives /etc/rancher/k3s/k3s.yaml
group and world read permissions so that we can run kubectl
without sudo
.
The INSTALL_K3S_EXEC
argument can be modified at /etc/systemd/system/multi-user.target.wants/k3s.service
.
# MAC Address Generator | |
# Generates valid unicast locally administered addresses by | |
# setting bit 2 of the first byte and clearing bit 1 of the first byte. | |
# Documentation: http://www.noah.org/wiki/MAC_address | |
# Script URL: https://gist.github.com/ben-z/3b18d1608868e6abf2212a435a216803 | |
# https://stackoverflow.com/a/3265767/4527337 | |
function prettyprintmac { | |
echo $1 | sed -e 's/../&:/g' -e 's/:$//' | |
} |
#!/bin/bash | |
#SBATCH --time=0-00:01:00 # time (DD-HH:MM:ss) | |
# Print system info (useful on shared HPCs) | |
# The example header is for running on Compute Canada | |
# https://docs.computecanada.ca/wiki/Running_jobs | |
echo "------ Gathering System Info" | |
set -x | |
hostname |