Skip to content

Instantly share code, notes, and snippets.

Avatar
🦄
🚀

Ben Zhang ben-z

🦄
🚀
View GitHub Profile
@ben-z
ben-z / K3sInstallationNotes.md
Last active Nov 15, 2020
K3s Installation Notes
View K3sInstallationNotes.md

K3s Installation Notes (for running Gitlab Runner)

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.

@ben-z
ben-z / keybase.md
Created Apr 24, 2015
Keybase proof
View keybase.md

Keybase proof

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:

@ben-z
ben-z / css-login.html
Last active Aug 29, 2015
Simple Log In Form with css. Preview on Codepen: http://codepen.io/anon/pen/azrmoB
View css-login.html
<!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>
@ben-z
ben-z / HHVMErrorHandler.php
Last active Aug 7, 2016
HHVM Error Handling - Error display in browser
View HHVMErrorHandler.php
<?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);
You can’t perform that action at this time.