Skip to content

Instantly share code, notes, and snippets.

View xtornasol512's full-sized avatar

Jesús Alvarado Garzón xtornasol512

View GitHub Profile
@xtornasol512
xtornasol512 / .htaccess
Last active December 17, 2015 20:18
Archivos django.fcgi y .htaccess para Deployar django en bluehost
AddHandler fcgid-script .fcgi
Options +SymLinksIfOwnerMatch
RewriteEngine On
RewriteBase /
RewriteRule ^(public/.*)$ - [L]
# Esta linea dirige a static_media
RewriteRule ^(static_media.*)$ - [L]
# La razon que tengo dos es que trabajo en equipo
# y aveces mi equipo usa static o static_media
@xtornasol512
xtornasol512 / Mysql and Django.md
Last active September 2, 2017 04:38
Cómo instalar MySql en Debian/derivados, crear Bases de Datos y Usuarios para usarlos en Django

Instalar Mysql con Python y Django Debian/Derivados

Para instalar necesitamos tener unas dependencias en el sistema por ahora mostraremos en equipos Debian y Derivados. Pero primero instalares actualizaciones y MySQL


Actualizaciones y MySQL

@xtornasol512
xtornasol512 / PostgreSQL and Django.md
Last active December 27, 2015 21:09
Instalación de PostreSql y Configuración con Django.

Instalar PostGreSQL con Python y Django Debian/Derivados

Para instalar necesitamos tener unas dependencias en el sistema por ahora mostraremos en equipos Debian y Derivados. Pero primero instalares actualizaciones y MySQL


Actualizaciones del sistema

@xtornasol512
xtornasol512 / Distraction Free Mode
Created November 15, 2013 05:28
My Settings-User Sublime text 2
{
"line_numbers": false,
"gutter": false,
"draw_centered": false,
"wrap_width": 0,
"word_wrap": true,
"margin": 0,
"scroll_past_end": true
}
@xtornasol512
xtornasol512 / MyConfigs.htacces
Created November 15, 2013 06:38
Configuraciones regulares en el Archivo de .htacces de Apache
Options +SymLinksIfOwnerMatch
RewriteEngine On
#Indexes para evitar que naveguen por las carpetas
Options -Indexes
#Agregar error 404 a 404.html
ErrorDocument 404 /404.html
#Redirecciones a páginas
Redirect /Contacto.html http://neijingtehuacan.com/pages/contacto.html
@xtornasol512
xtornasol512 / resize1920.py
Created April 29, 2014 21:25
Wand, Python, resize 1920 and quality 92 or more
# -*- coding: utf-8 -*-
"""
Author: Jesus A. Garzon
github: xtornasol512
twitter: xtornasol512
Description:
Just put this script in your directory of images
After create a directory for img_result
Then execute the script
python resize1920.py
@xtornasol512
xtornasol512 / emailing.php
Created July 2, 2014 19:34
Archivo PHP para enviar Emails en Bluehost
<?php
/*
* A Design by PhyroServer
Author: PhyroServer
Author URL: http://phyroserver.com
License: Creative Commons Attribution 3.0 Unported
License URL: http://creativecommons.org/licenses/by/3.0/
*
*/
$userName=$_REQUEST['userName'];
@xtornasol512
xtornasol512 / dabblet.css
Last active August 9, 2016 19:15
N9eeks Saludos
/**
* N9eeks Saludos
* The first commented line is your dabblet’s title
*/
font-size: 2em;
background: #f06;
background: linear-gradient(20deg, #f06, yellow);
min-height: 100%;
color: #fff;
@xtornasol512
xtornasol512 / estados.py
Created November 7, 2016 18:23
Lista de estados de México, formato tupla
# -*- coding: utf-8 -*-
"""
lista de estados de la Mexico
"""
AGC = "Aguascalientes"
BCN = "Baja California Norte"
BCS = "Baja California Sur"
CAMP = "Campeche"
CHI ="Chiapas"
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hola Mundo</title>
<link rel="stylesheet" href="css/foundation.min.css">
</head>
<body>
<h1>Hola Mundo</h1>