Skip to content

Instantly share code, notes, and snippets.

@pyjavo
pyjavo / install_hp.sh
Created August 15, 2024 21:02 — forked from Lh4cKg/install_hp.sh
Installing networked HP printer and scanner on Fedora Linux
# docs for more information see the official HPLIP project site here.
# https://developers.hp.com/hp-linux-imaging-and-printing
# Step 1. Update Fedora Linux
# Simply run dnf command:
$ sudo dnf upgrade
# Step 2. Search for HPLIP software
@pyjavo
pyjavo / wget.sh
Created December 3, 2020 17:13 — forked from crittermike/wget.sh
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
@pyjavo
pyjavo / csv_to_django.py
Created August 26, 2020 18:24
Snippet de Dario
# Full path and name to your csv file
csv_filepathname=""
# Full path to your django project directory
home=""
import sys,os
sys.path.append(home)
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
import django
@pyjavo
pyjavo / Dockerfile
Created January 27, 2020 22:27
GeoDjango Docker Container Alpine
FROM python:3.7-alpine
ENV PYTHONUNBUFFERED 1
RUN apk update \
# psycopg2 dependencies
&& apk add --virtual build-deps gcc python3-dev musl-dev \
&& apk add postgresql-dev \
# Pillow dependencies
&& apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev \
@pyjavo
pyjavo / sacar_provecho_eventos_tech.md
Last active December 19, 2019 13:36
Borrador de la charla en el meetup de Python Barranquilla

Saca el máximo provecho a eventos internacionales

Hola, mi nombre es Javier Daza. Soy ingeniero electrónico de la Universidad del Norte y me he desempeñado como desarrollador web desde el 2014. Soy el fundador de Python Barranquilla y co-organizador de PyCon Colombia 2018, 2019 y diversos eventos de Django Girls en Colombia. Actualmente trabajo en una empresa que se llama WeKnow Inc donde desarrollamos en tecnologías como Drupal, NodeJS, ReactJS, Python y Flutter.

Hasta el momento he participado en los siguientes eventos:

  • Understanding Risk Forum 2016 (Venezia, Italia)
  • PyCon Colombia 2018 y 2019 (Bogotá y Medellín, Colombia)
@pyjavo
pyjavo / recursos.py
Last active July 10, 2019 06:37
Recursos Recomendados para crear Comunidades de Tecnología Exitosas
# 1. Libro Tribes: We Need You to Lead Us
# https://www.amazon.com/Tribes-We-need-you-lead-ebook/dp/B004L622IW/ref=sr_1_2?keywords=tribes&qid=1549730795&s=gateway&sr=8-2
# 2. Libro High Output Management
# https://www.amazon.com/High-Output-Management-Andrew-Grove/dp/0679762884
# 3. Libro The Manager's Path: A Guide for Tech Leaders Navigating Growth and Change
# https://www.amazon.com/Managers-Path-Leaders-Navigating-Growth/dp/1491973897
# 4. Managing the Unmanageable: Rules, Tools, and Insights for Managing Software People and Teams
@pyjavo
pyjavo / zen_python.md
Last active February 3, 2021 07:28
El zen de Python: Explicado y con ejemplos

El Zen de Python

============ Este post se encuentra publicado en https://pybaq.co/blog/el-zen-de-python-explicado/ ===========

Si alguna vez abren la consola de python y escriben import this verán que les aparecerán las líneas con el famoso Zen de Python:

  1. Beautiful is better than ugly.
  2. Explicit is better than implicit.

Test-Driven Django Development

Our first test: str method

from django.test import TestCase
@pyjavo
pyjavo / taller_basico_django.py
Last active June 19, 2016 18:13
Códigos utilizados para el taller básico de django
# ---------------- CONSOLA ----------------
'''
pwd (cd en windows)
ls (dir en windows)
cd Desktop
mkdir practica
Pequeño reto: En el directorio de práctica, crea una nueva carpeta llamada test.
Use los comandos cd y mkdir.