Skip to content

Instantly share code, notes, and snippets.

View Couto's full-sized avatar
👽
Did you raid area 51?

Luís Couto Couto

👽
Did you raid area 51?
View GitHub Profile
@Couto
Couto / neotest.lua
Created October 30, 2023 08:32
neotest.lua
return {
"nvim-neotest/neotest",
cond = not vim.g.vscode,
config = function()
-- get neotest namespace (api call creates or returns namespace)
local neotest_ns = vim.api.nvim_create_namespace("neotest")
vim.diagnostic.config({
virtual_text = {
format = function(diagnostic)
local message = diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "")
@Couto
Couto / docker-compose-ce.yaml
Created July 17, 2023 09:31
Passbolt docker-compose with default envs
version: "3.9"
services:
db:
image: mariadb:10.11
restart: unless-stopped
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "true"
MYSQL_DATABASE: "${MYSQL_DATABASE:-passbolt}"
MYSQL_USER: "${MYSQL_USER:-passbolt}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD:-passbolt}"
@Couto
Couto / Dockerfile
Last active October 26, 2021 11:24
Install SphereServer X using docker
FROM debian:buster-slim
WORKDIR /sphere
RUN apt-get update --fix-missing \
&& apt-get install -y \
curl \
mysql-common \
&& apt-get clean;
@Couto
Couto / readme.md
Created March 23, 2020 18:18
Storybook Typescript Path alias example

asd

const curry = fn =>
function cf(...args) {
return args.length >= fn.length
? fn(...args)
: (...newArgs) => cf(...[...args, ...newArgs]);
};
const element = curry((element, attributes, children) => {
const el = Object.keys(attributes).reduce(
(el, attribute) => el.setAttribute(attribute, attributes[attribute]),
@Couto
Couto / changelog.sh
Last active March 7, 2019 16:12
Create a short changelog between two tags
git shortlog -e --format="%h %s" <last_tag>..HEAD | git tag -s <new_tag> -F -
```
First Name <email@example.com> (5):
f2b7c5c Add support for multiple environments (#3)
ac202d9 Configure read_only mode (#5)
024d580 Convert `read_only_dashboard` to string (#6)
dcfa003 Add monitors submodule (#7)
fa92fc2 Fix metrics' properties (#8)
# Create the patch
git reset --hard origin/master
git format-patch -o /tmp -1 HEAD > /tmp/patch-name
# For each service
git checkout master
git pull --ff-only
git checkout -b "$(basename -s .patch $(cat /tmp/patch-name))"
git am -3 "$(cat /tmp/patch-name)"

Keybase proof

I hereby claim:

  • I am Couto on github.
  • I am couto_yld (https://keybase.io/couto_yld) on keybase.
  • I have a public key whose fingerprint is DAD8 A82B 1EBA 55FE 0FD8 BB82 D64F 0C33 E970 FB79

To claim this, I am signing this object:

@Couto
Couto / terraform.rb
Last active January 18, 2019 11:01
terraform v0.10.8
require "language/go"
class Terraform < Formula
desc "Tool to build, change, and version infrastructure"
homepage "https://www.terraform.io/"
url "https://github.com/hashicorp/terraform/archive/v0.11.8.tar.gz"
sha256 "c0d7a0b726579574bcfee2ae141be4e82d1c9ab4a339cc6f86f9ec38de9130fb"
head "https://github.com/hashicorp/terraform.git"
bottle do
@Couto
Couto / main.js
Last active July 31, 2018 15:05
Demonstration of a bug in rollup-plugin-commonjs
export default (a, b) => a + b;