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 / requirements.txt
Last active August 24, 2017 17:39
Django Redis conf
# Redis apps
redis==2.10.5
rq==0.7.0
django-redis==4.7.0
django-rq==0.9.4
django-rq-email-backend==0.1.3
@xtornasol512
xtornasol512 / README.md
Created July 15, 2017 04:30 — forked from celisflen-bers/README.md
Python script to convert DBF database file to CSV
@xtornasol512
xtornasol512 / find_commands.sh
Created May 25, 2017 19:49
Pro Tip Commands Linux
# Look for certain files then get the size of everithng finding on current dir
find . -name "*lua*" -type f -exec du -ch {} + | grep total$
# Look for files with a patron on a current dir
find . -name "*lua*" -type f
# Delete all files find them with a patron
find . -name "*lua*" -type f -delete
@xtornasol512
xtornasol512 / Convert4SpacesTo2SpacesWithSublime.txt
Last active February 8, 2017 20:04
Convert 4 spaces to 2 spaces with Sublime
Assuming you have the following settings in Sublime:
"tab_size": 2,
"translate_tabs_to_spaces": true,
If you get a file indented with 4 fucking spaces:
``
Select all
View > Indentation > tab width: 4
View > Indentation > convert indentation to tabs
@xtornasol512
xtornasol512 / .gitignore
Created February 8, 2017 16:50
Basic git ignore file for salesforce and mavensmate with sublime text
#Sublime nature exclusions
*.sublime-workspace
*.sublime-project
*.sublime-settings
#MavensMate nature exclusions
config/*
*.log
deploy/
debug/
#CaracteristicasPersonales
class Parte5View(View):
form_class=Parte5Form
initial=''
errores=[]
template_name = 'anexo8/parte5.html'
def get(self, request):
form = self.form_class(initial=self.initial)
return render(request, self.template_name, {'form': form})
def post(self, request):
<!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>
@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"
@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 / 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'];