Skip to content

Instantly share code, notes, and snippets.

View ricardopadua's full-sized avatar
🎯
Focusing

Ricardo Pádua ricardopadua

🎯
Focusing
View GitHub Profile
@ricardopadua
ricardopadua / netrw.txt
Created August 17, 2022 11:36 — forked from danidiaz/netrw.txt
Vim's netrw commands.
--- ----------------- ----
Map Quick Explanation Link
--- ----------------- ----
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
<c-h> Edit file hiding list |netrw-ctrl-h|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
@ricardopadua
ricardopadua / pipeline.ex
Last active July 21, 2022 00:28
pipeline Ecto Multi
@spec pipeline(any) :: (() -> any)
def pipeline(params) do
create_operation = fn (multi, params) ->
Ecto.Multi.run(multi, :create_operation, fn _, _ ->
Logger.info("create_operation")
{:ok, nil}
end)
end
verify_condition = fn (multi, params) ->
@ricardopadua
ricardopadua / docker-compose.yml
Last active March 19, 2022 16:25
alchemist-training
version: '3.8'
services:
livebook:
image: 'livebook/livebook:0.5.2'
container_name: livebook
restart: always
ports:
- '8080:8080'
networks:
- "prologic-net"
@ricardopadua
ricardopadua / config
Created March 1, 2022 01:51 — forked from pksunkara/config
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@ricardopadua
ricardopadua / pg-connections.sql
Created February 27, 2022 02:40
kill all connections in postgres
-- identify all connection in host
select datname,
pid,
usename,
application_name,
client_addr,
client_hostname,
backend_start
from pg_stat_activity
@ricardopadua
ricardopadua / docker-compose.override.yml
Last active March 16, 2022 20:43
my docker development environment
version: '3.8'
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
container_name: zookeeper
networks:
- prologic-net
environment:
ZOOKEEPER_CLIENT_PORT: 2181
@ricardopadua
ricardopadua / downgrade-erlang-asdf.sh
Created January 28, 2022 17:30
i solved this issue by uninstalling autoconf with homebrew then manually installing autoconf 2.69 with (https://github.com/asdf-vm/asdf-erlang/issues/195)
curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar zxvf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure && make && sudo make install
@ricardopadua
ricardopadua / install_asdf.sh
Last active February 20, 2025 15:21
Installing Elixir and Erlang With ASDF ( Fedora )
#!/bin/bash
## Ricardo Pádua
## install asdf in fedora
## install curl and git
dnf install curl git
## install asdf
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.9.0
@ricardopadua
ricardopadua / .env
Last active December 2, 2021 01:52
aws tricks
USERID=
PASSWORD=
PROJECT_ID=
CLIENT_ID=
AWS_CREDENTIAL_OUTPUT=
AWS_CREDENTIAL_REGION_NON_PROD=
AWS_CREDENTIAL_REGION_PROD=
URL_AUTH=
URL_VAULT=
URL_REFERRER=
#
# cassandra-rackdc.properties
#
# The lines may include white spaces at the beginning and the end.
# The rack and data center names may also include white spaces.
# All trailing and leading white spaces will be trimmed.
#
dc=DC1
rack=Rack1
# prefer_local=<false | true>