Skip to content

Instantly share code, notes, and snippets.

View NekoTashi's full-sized avatar

Christopher Rubio Márquez NekoTashi

View GitHub Profile
This file has been truncated, but you can view the full file.
{
"lighthouseVersion": "10.4.0",
"requestedUrl": "https://www.falabella.com/falabella-cl",
"mainDocumentUrl": "https://www.falabella.com/falabella-cl",
"finalDisplayedUrl": "https://www.falabella.com/falabella-cl",
"finalUrl": "https://www.falabella.com/falabella-cl",
"fetchTime": "2023-07-28T00:55:24.386Z",
"gatherMode": "navigation",
"runWarnings": [],
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",
@NekoTashi
NekoTashi / fields.md
Last active June 30, 2021 18:33
item-fields
field type detail
code_chain string En blanco
sku int ID Unico
name string Descripcion del SKU
description string Descripcion del SKU
short_description string Existe Campo pero no manejos datos en él, lo enviaremos en Blanco
category1 string codigo del Grupo
description_category1 string Descripcion del grupo
category2 string codigo del subgrupo
@NekoTashi
NekoTashi / notes.md
Last active April 16, 2019 18:15
Instance Group GCP
  • gcloud compute ssh qmatch-web-capture-scraper-5 --project miin-vps --zone us-east1-c
  • sudo su
  • su - ldiaz
  • pm2 start <file.js>
  • pm2 logs
  • pm2 stop <file.js>
  • pm2 delete <id|name>
  • qmatch-web-capture-selectors-img-001
@NekoTashi
NekoTashi / notas.md
Created November 22, 2018 18:26
ArrayReferenceField
title permalink
Using Djongo Array Reference Field
/using-django-with-mongodb-array-reference-field/

Array Reference field

The ArrayReferenceField is one of the most powerful features of Djongo. The ArrayModelField stores the embedded models within a MongoDB array as embedded documents for each entry. If entries contain duplicate embedded documents, using the ArrayModelField would require unnecessary disk space. The ManyToManyField on the other hand has a separate table for all the entries. In addition, it also creates an intermediate "through/join" table which records all the mappings.

The ArrayReferenceField is a bargain between the ArrayModelField and ManyToManyField. A separate collection is used for storing all entries (instead of embedding it as an array). This means there is no data duplication. However, the intermediate "through/join" mapping table is completely skipped! This is achieved by storing only a reference to the entries in the embedded array.

@NekoTashi
NekoTashi / activate_venv.sh
Created October 12, 2018 14:54
How to activate venv inside a bash script.
#!/bin/sh
set -e
cd "<virtualenv_dir>"
source bin/activate
# -- Your code here!
@NekoTashi
NekoTashi / notas.md
Last active April 21, 2018 20:21
Proyecto Hugo Forms.

Notas

  • Mostrar el MS del server con 3 estados: rojo, amarillo, verde. Al presionar es elemento, que se muestre la explicación de cada uno de los colores.
  • Choice es un input que puede tener como dependecia otros inputs.

Convenciones

  • Form: Conjunto de inputs.
  • Input: Elemento que contiene un dato.
@NekoTashi
NekoTashi / leap_year.py
Created January 3, 2018 15:10
365 does not include leap year.
from datetime import datetime, timedelta
PYBITES_BORN = datetime(year=2016, month=12, day=19)
def my_gen_special_pybites_dates():
days = 1
while True:
dt = PYBITES_BORN + timedelta(days=days)
# if days % 100 == 0: # commented to print only 'every year'
@NekoTashi
NekoTashi / seed_pagination.py
Created November 9, 2017 19:41 — forked from bendavis78/seed_pagination.py
Example implementation of randomized pagination in django and django-rest-framework
"""
Adds a `seed` paramter to DRF's `next` and `prev` pagination urls
"""
from rest_framework import serializers
from rest_framework import pagination
from rest_framework.templatetags.rest_framework import replace_query_param
from . import utils
@NekoTashi
NekoTashi / tzdata.md
Created May 17, 2017 17:55
Configurando timezones en el servidor (Debian)

Actualizar tzdata

  • sudo apt-get update && sudo apt-get install tzdata

Setear timezone en el servidor

  • timedatectl status mostrará el setting actual.
  • timedatectl list-timezones muestra los timezones disponibles.
  • sudo timedatectl set-timezone America/Santiago lo setea.