Skip to content

Instantly share code, notes, and snippets.

View ljesparis's full-sized avatar
:octocat:

Leonardo Esparis ljesparis

:octocat:
View GitHub Profile
@ljesparis
ljesparis / cod_lenguaje_pais.sql
Created July 18, 2019 11:34 — forked from EOM/cod_lenguaje_pais.sql
Tabla, con los Código ISO País, Lenguaje, I18N, para MySQL listo para utilizar en nuestros desarrollos. es_AR, es_BO, pl_BR, Etc.. Yo lo utilizo para vincular con la tabla con todos los IP del mundo que pertenece a cada pais. Mas info: http://www.ipligence.com/faq
/*
MySQL
Target Server Type : MYSQL
Target Server Version : 50022
File Encoding : 65001
Date: 2012-12-30 21:22:23
*/

The reStructuredText Cheat Sheet: Syntax Reminders

Info

See <http://docutils.sf.net/rst.html> for introductory docs.

Author

David Goodger <goodger@python.org>

Date

$Date: 2013-02-20 01:10:53 +0000 (Wed, 20 Feb 2013) $

Revision

$Revision: 7612 $

Description

This is a "docinfo block", or bibliographic field list

Note

If you are reading this as HTML, please read

@ljesparis
ljesparis / smtp_client.go
Last active December 9, 2017 23:30
basic smtp client
package main
import (
"bufio"
"fmt"
"log"
"net"
"strconv"
"strings"
)
@ljesparis
ljesparis / smtp_basic_commands.go
Created December 9, 2017 01:08
basic smtp commands
// protocolo SMTP simple.
// S = client
// R = server
// forward-path = correo que va a recibir el mail
// reverse-path = correo que va a enviar el mail
// S: EHLO <HOST> <CRLF>
// R: 250 OK
@ljesparis
ljesparis / smtp_server.py
Created December 8, 2017 23:58
medium smtp server
import smtpd
import asyncore
class CustomSMTPServer(smtpd.SMTPServer):
def process_message(self, peer, mailfrom, rcpttos, data):
print 'Receiving message from:', peer
print 'Message addressed from:', mailfrom
print 'Message addressed to :', rcpttos
print 'Message length :', len(data)
@ljesparis
ljesparis / license-badges.md
Created May 10, 2017 14:57 — forked from lukas-h/license-badges.md
License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • Badges are made with Shields.io.
  • This badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  
  • 🇫🇷 Cette liste en français
@ljesparis
ljesparis / introrx.md
Created January 24, 2017 03:13 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@ljesparis
ljesparis / gist:bf38a3c687c7578a84a3
Last active August 29, 2015 14:16
django -->> mixin to get the lastest photo uploaded
from django.views.generic import TemplateView
from sorl.thumbnail import get_thumbnail
from collections import OrderedDict
from django.db import models
# Model
class Something(models.Model):
photo = models.ImageField(upload_to='somewhere', blank=True)
date_time = models.DateTimeField(auto_now=True)
@ljesparis
ljesparis / gist:5fee44045e820e5d6d5a
Created March 10, 2015 03:31
upgrade all ur python libs
import subprocess
import argparse
import re
import sys
class BaseUpgrade(object):
def __init__(self, vpip, libs=[], *args, **kwargs):
@ljesparis
ljesparis / navegation.py
Created January 4, 2015 15:55
Directory nevagation
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Directory nevagation
from os import path
import os, glob
def search(directory=None,guiones='---'):
global cantidad_dir , cantidad_file