sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
# run a kubernetes cluster in local VM using vagrant + k3s | |
# require: Virtualbox, vagrant | |
# steps: | |
# * in the folder contain this `Vagrantfile`, run `vagrant up` and wait a bit for provisioning. | |
# Once done, `vagrant ssh master` into the node and start using the k8s cluster, | |
# such as `kubectl get nodes`, `kubectl get pods -A`, `kubectl get componentstatus`, | |
# or `kubectl run busybox --image=busybox:1.28 --rm --restart=Never -it -- nslookup kubernetes` | |
# * To clean up, logout these nodes, then run `vagrant destroy` to destroy the VMs. | |
# - next time run `vagrant up` again to provision again | |
# - or run `vagrant halt` to halt these VMs, and bring them back to the same state |
Directories on host machine:
/data/certbot/letsencrypt
/data/certbot/www
Nginx server in docker container
docker run -d --name nginx \
# CI overrides | |
version: '3' | |
services: | |
web: | |
environment: | |
- DATABASE_URL | |
- DJANGO_SETTINGS_MODULE | |
- SECRET_KEY | |
- PORT |
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found
/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
window.geocoder = new google.maps.ClientGeocoder(); | |
geocoder.getLocations('rua xyz, sp', function(result){ | |
var placemark = result.Placemark[0]; // Only use first result | |
var accuracy = placemark.AddressDetails.Accuracy; | |
var zoomLevel = 1; | |
var lon = placemark.Point.coordinates[0]; | |
var lat = placemark.Point.coordinates[1]; | |
gmap.setCenter(new google.maps.LatLng(lat, lon), zoomLevel); | |
}); |