Skip to content

Instantly share code, notes, and snippets.

View sanjmen's full-sized avatar
viento en popa a toda vela

Santiago Mendez sanjmen

viento en popa a toda vela
View GitHub Profile
exclude: "^docs/|/migrations/"
default_stages: [commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
@sanjmen
sanjmen / gist:0963fe3b4bbe1cf55742e936d070f73c
Created May 6, 2024 17:19
json-response-parse-store-db
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
import requests
from books.models import Book, Author, Reviewer, Genre, Editorial, Tag
from books.utils import get_urls_as_text
class Command(BaseCommand):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sanjmen
sanjmen / sentry_settings
Created February 13, 2022 19:17
Sentry settings for django app
# Sentry related config vars
SENTRY_ENABLED = env.bool("SENTRY_ENABLED", default=False)
SENTRY_DSN = env("SENTRY_DSN", default="")
SENTRY_ENVIRONMENT = env("SENTRY_ENVIRONMENT", default="staging")
if SENTRY_ENABLED:
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from sentry_sdk.integrations.celery import CeleryIntegration
@sanjmen
sanjmen / nginxoptimization.config
Created December 22, 2021 19:31 — forked from wearhere/nginxoptimization.config
Optimized nginx configuration for an AWS Elastic Beanstalk environment using an Application Load Balancer.
files:
"/opt/elasticbeanstalk/#etc#nginx#optimized-nginx.conf":
mode: "000644"
owner: root
group: root
encoding: plain
content: |
# Elastic Beanstalk Managed
# Elastic Beanstalk managed configuration file
@sanjmen
sanjmen / vue.config.js
Created February 9, 2021 14:10 — forked from wlee221/vue.config.js
Vue 3: `vue.config.js` configuration for Amplify UI Components
module.exports = {
chainWebpack: config => {
config.module
.rule('vue')
.use('vue-loader')
.tap(options => {
options.compilerOptions = {
...(options.compilerOptions || {}),
isCustomElement: tag => tag.startsWith('amplify-')
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.