Skip to content

Instantly share code, notes, and snippets.

View gcavalcante8808's full-sized avatar

Gabriel Abdalla Cavalcante gcavalcante8808

View GitHub Profile
@gcavalcante8808
gcavalcante8808 / eol-at-eof.md
Created June 22, 2023 19:39 — forked from camh-/eol-at-eof.md
Please add newlines at end of files

See https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline

A newline in a text file is a terminator, not a separator. This means each line should have a newline at the end of it, including the last line of the file.

Many editors automatically add the newline at the end of the file. Some do not. If you can configure your editor to ensure there is always a newline at the end of every line, please do so.

Because many editors do add this newline, if you commit a text file without it, when someone else edits the file, their editor will (correctly) add the newline. This causes a spurious diff in the file. Spurious

Some samurai gif to be used with whatsapp
@gcavalcante8808
gcavalcante8808 / docker_multipass_cloudinit.yaml
Created August 11, 2021 14:21
A docker setup using multipass and cloudinit on MACos (but works fine with Linux as well, just check the path on the mount unit)
#cloud-config
apt:
sources:
docker:
source: "deb [arch=amd64] https://download.docker.com/linux/ubuntu $RELEASE stable"
key: |
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFit2ioBEADhWpZ8/wvZ6hUTiXOwQHXMAlaFHcPH9hAtr4F1y2+OYdbtMuth
lqqwp028AqyY+PRfVMtSYMbjuQuu5byyKR01BbqYhuS3jtqQmljZ/bJvXqnmiVXh
{
"definitions": {
"virtualservices.networking.istio.io": {
"properties": {
"spec": {
"description": "Configuration affecting label/content routing, sni routing, etc. See more details at: https://istio.io/docs/reference/config/networking/virtual-service.html",
"properties": {
"exportTo": {
"description": "A list of namespaces to which this virtual service is exported.",
"items": {
@gcavalcante8808
gcavalcante8808 / docker-compose.yaml
Created September 23, 2020 02:01
Depends on based on healthchecks.
version: '2.4'
volumes:
db-data:
services:
db:
image: postgres:11-alpine
environment:
@gcavalcante8808
gcavalcante8808 / kubectl.md
Created March 19, 2020 12:52 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@gcavalcante8808
gcavalcante8808 / Dockerfile
Created March 5, 2020 09:11
K3s with NFS Tools support
FROM rancher/k3s:v1.0.0 as base
# https://github.com/rancher/k3s/issues/390
# Because of the above issue, we want to add
# some software into our container, and alpine
# is easier to work with than scratch.
FROM alpine:3.10
# Do the same stuff in the k3s-scratch image's
# final stage.
@gcavalcante8808
gcavalcante8808 / disable_super.md
Created September 14, 2019 16:00
Disable open menu with super on ubuntu mate 1804

gsettings set org.mate.mate-menu hot-key '' gsettings set com.solus-project.brisk-menu hot-key ''

@gcavalcante8808
gcavalcante8808 / Makefile
Created September 14, 2019 03:13
Using docker-compose as shell
SHELL = /usr/local/bin/docker-compose
.SHELLFLAGS = run --rm app sh -c
@gcavalcante8808
gcavalcante8808 / proton.log
Created August 21, 2019 02:23
Age Of Empires DE Proton Logs
This file has been truncated, but you can view the full file.
======================
Proton: 1561645030 proton-4.2-9
SteamGameId: 1017900
Command: ['/media/data/SteamLibrary/steamapps/common/AoEDE/AoEDE_s.exe']
======================
ERROR: ld.so: object '/home/arthas/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/arthas/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/arthas/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/arthas/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.