Skip to content

Instantly share code, notes, and snippets.

View pvgomes's full-sized avatar
:octocat:
Focusing

Paulo Victor Leite Lima Gomes pvgomes

:octocat:
Focusing
View GitHub Profile

Crow's foot notation

erDiagram
    CUSTOMER ||--o{ ORDER : "places / placed by"
    ORDER ||--|{ ORDER_ITEM : "contains / belongs to"
    PRODUCT ||--o{ ORDER_ITEM : "included in / includes"
    PERSON ||--|{ ROUTE : "assigned to / assigned by"
    CUSTOMER }o--|| ROUTE : "belongs to / covers"
    ORDER_ITEM ||--o{ DELIVERY : "fulfilled by / fulfils"
@pvgomes
pvgomes / words.md
Last active January 29, 2025 10:13
Words, phrases and sentences most used by ChatGPT - good prompts to avoid

Words, phrases and sentences most used by ChatGPT

You might use this words before chatGPT, but some sort of combination with them makes clear that you're using GPT, so, avoid them

Words

(alphabetical order)

  • Additionally
  • Aesthetic
  • Beacon
  • Crucible
@pvgomes
pvgomes / commands.sh
Created December 21, 2020 19:56
CSGO mac optimization
sudo renice -20 -p `ps aux | grep csgo_osx | grep -v grep | awk '{print $2}'`
@pvgomes
pvgomes / README.md
Last active April 23, 2020 21:07
fix ubuntu and mysql timezone

fix ubuntu timezone

sudo dpkg-reconfigure tzdata

fix mysql timezone

If you're struggling with the error:

@pvgomes
pvgomes / reset_sidekiq.rb
Created April 17, 2020 17:51
an example to reset sidekiq counter
require 'sidekiq/api'
Sidekiq.redis {|c| c.del('stat:processed') }
Sidekiq.redis {|c| c.del('stat:failed') }
# Sidekiq.redis { |r| r.lrange "queue:app_queue", 0, -1 }
#
# # Count messages in queue
# # default_queue = Sidekiq::Queue.new
@pvgomes
pvgomes / Dockerfile
Created April 7, 2020 19:32
Docker file example
FROM mysql:8.0.19
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git
@pvgomes
pvgomes / template.yaml
Created July 4, 2019 00:06
SAM template for symfony with bref on AWS Lambda
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Globals:
Function:
Environment:
Variables:
APP_ENV: prod
Resources:
@pvgomes
pvgomes / python3_s3_to_redshift_loader.py
Created January 23, 2019 16:16
Load data from S3 to Redshift using Python3
############ REQUIREMENTS TO INSTALL ####################
# THIS SCRIPT use category table from AWS sample data (https://docs.aws.amazon.com/redshift/latest/gsg/rs-gsg-create-sample-db.html)
# we use this sample data s3://awssampledbuswest2/tickit/category_pipe.txt
###### Linux users
#`sudo apt-get install libpq-dev`
###### Mac users
#`brew install libpq`
#!/usr/bin/env bash
shopt -s extglob
set -o errtrace
set -o errexit
rvm_install_initialize()
{
DEFAULT_SOURCES=(github.com/rvm/rvm bitbucket.org/mpapis/rvm)
@pvgomes
pvgomes / newrelic-sysmond.sh
Created October 15, 2017 19:55
newrelic-sysmond
#! /bin/sh
#
### BEGIN INIT INFO
# Provides: newrelic-sysmond
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $remote_fs
# Should-Start: $named
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6