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 / docker-compose.yml
Last active July 23, 2021 18:40
Architecture Distributed Environment
version: '3.4'
services:
cache-redis:
image: 'redis:6-alpine'
container_name: cache-redis
environment:
REDIS_HOST: ${REDIS_HOST}
REDIS_DEFAULT_USER: ${REDIS_DEFAULT_USER}
REDIS_DEFAULT_PASS: ${REDIS_DEFAULT_PASS}
ports:
@ricardopadua
ricardopadua / store.ts
Last active November 26, 2020 07:41
Vue 3 + Vuex 4 - useStoreModule composable
import { useStore, Store } from "vuex";
interface InternalModule<S, A, M, G> {
state: S;
actions: A;
mutations: M;
getters: G;
}
/**
@ricardopadua
ricardopadua / Dockerfile
Last active November 26, 2020 07:58
SqlServer (Query with Full-Text Search)
FROM ubuntu:16.04
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -yq curl apt-transport-https && \
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list | tee /etc/apt/sources.list.d/mssql-server.list && \
apt-get update && \
apt-get install -y mssql-server && \
apt-get install -y mssql-server-ha && \
@ricardopadua
ricardopadua / default.json
Last active April 15, 2021 03:55
sample configuration environment development for prologic-app (https://github.com/ricardopadua/prologic-api)
{
"typeorm": {
"type": "postgres",
"host": "localhost",
"port": 5432,
"username": "postgres",
"password": "postgres",
"database": "app_db_name",
"synchronize": true,
#
# 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>
@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=
@ricardopadua
ricardopadua / install_asdf.sh
Last active June 19, 2024 20:39
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 / 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 / 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 / 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