Skip to content

Instantly share code, notes, and snippets.

View jorgeas80's full-sized avatar
🎯
Focusing

Jorge Arévalo jorgeas80

🎯
Focusing
View GitHub Profile
@dbonillaf
dbonillaf / links_bonilista_619.md
Last active February 20, 2023 08:52
Sobre el software que se ejecuta en los coches modernos
@marcorichetta
marcorichetta / postgresql-manjaro.md
Last active April 18, 2024 03:10
Install PostgreSQL on Manjaro and set it up for Django
{
"meta": {
"theme": "elegant"
},
"basics": {
"name": "Thomas Davis",
"label": "Web Developer",
"image": "https://avatars0.githubusercontent.com/u/416209?s=460&u=38f220a2c9c658141804f881c334c594eb1642ac&v=4",
"summary": "I'm a full stack web developer who can build apps from the ground up. I've worked mostly at startups so I am used to wearing many hats. I am a very product focused developer who prioritizes user feedback first and foremost. I'm generally very flexible when investigating new roles. ",
"website": "https://lordajax.com",
@nafeu
nafeu / python3-script-template.py
Created January 29, 2019 12:34
Python3 Terminal Script Template
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Template for python3 terminal scripts.
This gist allows you to quickly create a functioning
python3 terminal script using argparse and subprocess.
"""
import argparse
@0xlino
0xlino / shopify-liquid-cheatsheet.liquid
Created July 25, 2018 12:03
Shopify Liquid Cheatsheet
Shopify objects that contain attributes that can be dynamically put on the page. For example, the product object contains an attribute called title that can be used to output the title of a product.
The handle is used to access the attributes of a Liquid object. By default, it is the object’s title in lowercase with any spaces and special characters replaced by hyphens (-). Every object in Liquid (product, collection, blog, menu) has a handle.
Collections & Products
Collection ►
all_types ►
Returns a list of all the product types for a collection
@dansup
dansup / .env
Last active August 31, 2019 01:13
PixelFed Alpha Installation
APP_NAME=PixelFed Test
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
ADMIN_DOMAIN="localhost"
APP_DOMAIN="localhost"
LOG_CHANNEL=stack
@wodCZ
wodCZ / Dockerfile
Created February 4, 2018 14:38
django, postgres, redis, celery, nginx, uwsgi docker setup
FROM python:latest
ADD requirements.txt /requirements.txt
RUN python3.6 -m venv /venv \
&& /venv/bin/pip install -U pip \
&& LIBRARY_PATH=/lib:/usr/lib /bin/sh -c "/venv/bin/pip install --no-cache-dir -r /requirements.txt"
ENV PYTHONUNBUFFERED 1
# Copy your application code to the container (make sure you create a .dockerignore file if any large files or directories should be excluded)
RUN mkdir /code/
@altaurog
altaurog / docker_descendants.py
Last active May 29, 2023 04:11
Python3 script to find descendants of one or more docker images
#!/usr/bin/python3
#
# usage: python3 docker_descendants.py <image_id> ...
import sys
from subprocess import check_output
def main(images):
image_ids = set(images)
import hashlib
from functools import wraps
from django.core.cache import cache
from django.utils.encoding import force_text, force_bytes
def cache_memoize(
timeout,
prefix='',
@mixxorz
mixxorz / services.py
Last active January 21, 2020 16:52
Django Service Objects
from django import forms
from django.core.exceptions import ValidationError
from django.db import transaction
class InvalidInputsError(Exception):
def __init__(self, errors, non_field_errors):
self.errors = errors
self.non_field_errors = non_field_errors