This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Author : Rafael Lima --> | |
<html lang="pt-BR"> | |
<head> | |
<meta charset="utf-8" /> | |
<title> | |
Rosa de los vientos </title> | |
<style> | |
@import url('http://fonts.googleapis.com/css?family=Raleway:400,200,300,500,600,700'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# install docker | |
# https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
# install docker-compose | |
# https://docs.docker.com/compose/install/ | |
# install letsencrypt | |
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#To install psycopg2 on alpine linux (dockerized) | |
apk add --update postgresql-client postgresql-dev | |
pip install psycopg2 | |
rm -rf /var/cache/apk/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client_max_body_size 500M; | |
location / { | |
proxy_set_header Host $host; # Another port: :8080; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_pass http://localhost:8002/; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from django.contrib.auth.decorators import login_required | |
from django.core.urlresolvers import reverse | |
from django.shortcuts import render_to_response, render, redirect | |
from django.template import RequestContext | |
from django.conf import settings | |
from django.http import HttpResponseRedirect, HttpResponse, JsonResponse | |
from django.contrib.auth import login, logout, authenticate | |
from django.contrib.auth.models import AnonymousUser | |
from django.contrib import messages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install build-essential libqt4-dev libgeis-dev libx11-6 libxtst-dev | |
En una carpeta persona: | |
$ git clone https://github.com/JoseExposito/touchegg.git | |
$ cd touchegg | |
$ qmake | |
$ make | |
$ sudo make install | |
Para que autoarranque: | |
$ cd .. | |
$ cd .config/autostart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Genera un listado de alumnos: | |
#imports necesarios: | |
from xhtml2pdf import pisa #INSTALAR ESTA LIBRERIA: xhtml2pdf | |
from django.template.loader import get_template | |
from django.http import HttpResponse | |
from django.template import Context | |
#En el ejemplo, hay una app llamada miappdecursos, importamos los modelos Curso y Alumno | |
from miappdecursos.models import Curso, Alumno | |
def generar_listado_alumnos_pdf(request, id_curso): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<header> | |
<meta charset="utf-8"> | |
<!-- Custom CSS --> | |
<style> | |
@page { | |
size: a4 portrait; | |
@frame image_frame { /* Static Frame - Donde se pone la imagen */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can easy do this by appearing custom attribute to model: | |
class A(models.Model): | |
_DATABASE = "X" | |
class B(models.Model): | |
_DATABASE = "X" | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Date : (2009-10-14 18-00) | |
# Last revision : (2009-10-14 18-00) | |
# Wine version used : 1.1.31 | |
# Distribution used to test : Fedora 11 | |
# Author : NSLW | |
# Licence : Retail | |
[ "$PLAYONLINUX" = "" ] && exit 0 | |
source "$PLAYONLINUX/lib/sources" |
NewerOlder