Skip to content

Instantly share code, notes, and snippets.

@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active October 22, 2025 23:27
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@akaron
akaron / Vagrantfile
Created October 28, 2020 14:11
use vagrant and k3s to deploy a kubernetes cluster in local VM
# 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
@maxivak
maxivak / _0__ssl_certbot_letsencrypt.md
Last active June 1, 2025 16:28
Let's encrypt SSL certificates using certbot in docker

Directories on host machine:

  • /data/certbot/letsencrypt

  • /data/certbot/www

  • Nginx server in docker container

docker run -d --name nginx \
@ashiklom
ashiklom / docker-compose.ci.yml
Created January 15, 2020 19:48
GitHub actions + Docker Compose example
# CI overrides
version: '3'
services:
web:
environment:
- DATABASE_URL
- DJANGO_SETTINGS_MODULE
- SECRET_KEY
- PORT
@Ryanb58
Ryanb58 / install.md
Last active July 23, 2025 14:27
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> 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]
@ricardodantas
ricardodantas / gmaps-lat-lon.js
Created March 11, 2014 18:35
Google Maps API - Pegar a latitude e longitude de um endereço
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);
});