A metatable can be defined like
local t = setmetatable({}, {
__tostring = function() return 'custom tostring behavior!' end
})Here are the metamethods that you can define, and their behavior
| # Install K3S | |
| curl -sfL https://get.k3s.io | sh - | |
| # Copy k3s config | |
| mkdir $HOME/.kube | |
| sudo cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config | |
| sudo chmod 644 $HOME/.kube/config | |
| # Check K3S | |
| kubectl get pods -n kube-system |
| # Bash completion script for k3d, because I couldn't find one. Do what you want with it. | |
| # If you're using zsh, this script should work as long as you have these lines in .zshrc: | |
| # | |
| # autoload bashcompinit | |
| # bashcompinit | |
| # source /path/to/your/bash_completion_file | |
| # | |
| # functions to grab k3d clusters info [would be nice if k3d list had a simple mode for grabbing names] |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| # Use an official centos7 image | |
| FROM centos:7 | |
| RUN yum update -y \ | |
| && yum install -y python2-pip | |
| # pipenv installation | |
| RUN pip install cassandra-migrate |
| package main | |
| import ( | |
| "encoding/json" | |
| "flag" | |
| "io/ioutil" | |
| "log" | |
| "net" | |
| "os" | |
| "os/signal" |
| %global contentdir /var/www | |
| # API/ABI check | |
| %global apiver 20090626 | |
| %global zendver 20090626 | |
| %global pdover 20080721 | |
| # Extension version | |
| %global fileinfover 1.0.5-dev | |
| %global pharver 2.0.1 | |
| %global zipver 1.11.0 | |
| %global jsonver 1.2.1 |