This file contains hidden or 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
from django.shortcuts import render | |
from django.http import HttpResponseRedirect | |
from rest_framework.decorators import api_view | |
from rest_framework.response import Response | |
from rest_framework import status | |
from datetime import datetime | |
from tramite.models import Expediente, DestinoDocumento, EstadoDestinoDocumento |
This file contains hidden or 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
um gt 139 | |
prd gt 247810 |
This file contains hidden or 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 npm cache clean -f | |
sudo npm install -g n | |
sudo n 6.11.0 |
This file contains hidden or 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
create user 'user'@'localhost' IDENTIFIED BY 'pass'; | |
GRANT ALL PRIVILEGES ON db.* TO 'user'@'localhost'; |
This file contains hidden or 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
cd public/sitio | |
drush dl drupal | |
# Descargará una carpeta algo asi drupal-7.42 | |
cp -pax drupal-7.42/. web | |
cd web | |
drush updb -y |
This file contains hidden or 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
# Search Hack. | |
$search = $('#search-block-form', context) | |
$search | |
.removeAttr('id') | |
$first = $search.find('div:first-child') | |
$($first.html()).appendTo($search) | |
$first.remove() |
This file contains hidden or 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
cd sites/all/default | |
mkdir files | |
su foreign | |
sudo chown -R www-data:www-data files | |
exit | |
cp default.settings.php settings.php | |
chmod 777 settings.php |
This file contains hidden or 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
function epsacrop_element_info_alter(&$type) { | |
$type['managed_file']['#process'][] = 'epsacrop_element_process'; | |
if (module_exists('multiupload_filefield_widget')) { | |
$type['mfw_managed_file']['#process'][] = 'epsacrop_element_process'; | |
} | |
if (module_exists('media')) { | |
$type['media']['#process'][] = 'epsacrop_element_process'; | |
} | |
} |
This file contains hidden or 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 uwsgi uwsgi-plugin-python | |
cd /etc/uwsgi/apps-available | |
sudo vim site.ini | |
# View site.ini | |
cd .. | |
cd apps-enabled | |
ln -s ../apps-available/site.ini | |
sudo service uwsgi restart | |
cd /etc/nginx/sites-available | |
sudo vim site.conf |
This file contains hidden or 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 functools import partial | |
import datetime | |
from reportlab.lib.pagesizes import letter, A4 | |
from reportlab.platypus import SimpleDocTemplate, Paragraph, Table, TableStyle, Image, Spacer | |
from reportlab.platypus import PageTemplate, BaseDocTemplate, NextPageTemplate, PageBreak, Frame | |
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle | |
from reportlab.lib.enums import TA_CENTER, TA_RIGHT, TA_LEFT |
NewerOlder