Skip to content

Instantly share code, notes, and snippets.

View luanbitar's full-sized avatar
🇧🇷

Luan Bitar luanbitar

🇧🇷
View GitHub Profile
@luanbitar
luanbitar / README.md
Last active September 11, 2025 21:50
Setup k8s in Hostinger VPS with Ubuntu 24.04 LTS

On worker node

To prepare the VPS/VM running ubuntu 24 to have everything setup for run k8s, you can run:

bash -c "$(curl -fsSL https://gist.github.com/luanbitar/b551930603d73f85ddb54303ae028d68/raw/install-k8s.sh)"

Prepare to install tailscale, enabling subnet router:

echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
sudo sysctl -p /etc/sysctl.d/99-tailscale.conf
@luanbitar
luanbitar / const.ts
Last active April 5, 2023 03:41
How to use the "in" keyword as a type?
export const DATE_FORMATS = {
DATETIME: "YYYY-MM-DD HH:mm:ss",
DATE: "YYYY-MM-DD",
DATETIME_NO_SEC: "YYYY_MM_DD HH:mm",
LLL: "LLL",
lll: "lll",
DD: "DD",
DATE_US: "MM-DD-YYYY",
MMM_DD: "MMM DD",
MMM_DD_HH_mm: "MMM-DD HH:mm",
cl_crosshair_drawoutline "1"
cl_crosshair_dynamic_maxdist_splitratio "0.35"
cl_crosshair_dynamic_splitalpha_innermod "1"
cl_crosshair_dynamic_splitalpha_outermod "0.5"
cl_crosshair_dynamic_splitdist "7"
cl_crosshair_friendly_warning "2"
cl_crosshair_outlinethickness "0"
cl_crosshair_sniper_show_normal_inaccuracy "0"
cl_crosshair_sniper_width "1"
cl_crosshair_t "0"
@luanbitar
luanbitar / .hyper.js
Last active February 24, 2019 04:41
Oh my zsh config
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@luanbitar
luanbitar / atom-settings.json
Last active August 11, 2018 15:11
atom system settings
{}
@luanbitar
luanbitar / 2-resposta.sql
Last active July 16, 2018 06:17
Exercício de banco de dados 2
#2a
# Buscar nome, CPF, e-mail, data de inscrição, tipo de inscrição (descrição) e código de inscrição dos cinco primeiros participantes inscritos;
SELECT p.nome, p.cpf, p.email,
i.data AS data_inscricao, i.codigo AS codigo_inscricao
FROM participante AS p
INNER JOIN participante_inscricao AS i
ON p.id = i.participante_id
ORDER BY i.data ASC
LIMIT 5;
#include "Fila.h"
#include <iostream>
#include <stdlib.h>
//http://br.ccm.net/faq/10254-lista-duplamente-encadeada
Fila::Fila(){
inicio=0;
}