Skip to content

Instantly share code, notes, and snippets.

View yriveiro's full-sized avatar
🧙‍♀️
Practicioner of Arcane and Forgotten Sorcery

Yago Riveiro yriveiro

🧙‍♀️
Practicioner of Arcane and Forgotten Sorcery
View GitHub Profile
@yriveiro
yriveiro / k3s_helm_install.sh
Created October 16, 2024 08:20 — forked from icebob/k3s_helm_install.sh
K3S + Helm installing
# 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

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

Operators

@yriveiro
yriveiro / install-clamav-osx.md
Created January 7, 2023 20:14 — forked from gagarine/install-clamav-osx.md
Howto Install clamav on OSX with brew

Howto Install clamav on OSX with brew

Note: on legacy intel system the path may be /usr/local/etc/clamav instead of /opt/homebrew/etc/clamav/

$ brew install clamav
$ cd /opt/homebrew/etc/clamav/
$ cp freshclam.conf.sample freshclam.conf
@yriveiro
yriveiro / k3d_complete
Created December 20, 2021 17:44 — forked from raffraffraff/k3d_complete
bash completion for k3d
# 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]
@yriveiro
yriveiro / nginx.conf
Created April 27, 2020 22:56 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@yriveiro
yriveiro / bobp-python.md
Created December 7, 2019 18:22 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@yriveiro
yriveiro / Dockerfile.centos7.python36.pipenv
Last active October 3, 2019 20:15 — forked from pvergain/Dockerfile.centos7.python36.pipenv
Dockerfile based on centos:7 with cassandra-migrate
# Use an official centos7 image
FROM centos:7
RUN yum update -y \
&& yum install -y python2-pip
# pipenv installation
RUN pip install cassandra-migrate
@yriveiro
yriveiro / grace.go
Created August 12, 2019 20:28 — forked from silkeh/grace.go
Golang graceful restart with TCP connections
package main
import (
"encoding/json"
"flag"
"io/ioutil"
"log"
"net"
"os"
"os/signal"
@yriveiro
yriveiro / php.spec
Created May 16, 2019 17:25 — forked from combatpoodle/php.spec
php-5.3.29 centos 7 spec
%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