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 -*- | |
import smtplib | |
from email.mime.text import MIMEText | |
def enviar_correo(asunto,texto,destinatario,origen="[email protected]"): | |
msg = MIMEText(texto) | |
# me == the sender's email address | |
# you == the recipient's email address | |
msg['Subject'] = asunto |
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/sh | |
### BEGIN INIT INFO | |
# Provides: FastCGI servers for Django | |
# Required-Start: networking | |
# Required-Stop: networking | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: S 0 1 6 | |
# Short-Description: Start FastCGI servers with Django. | |
# Description: Django, in order to operate with FastCGI, must be started | |
# in a very specific way with manage.py. This must be done |
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
server{ | |
server_name www.ejemplo.net ejemplo.net; | |
location / { | |
# host y puerto para servicio fastcgi | |
fastcgi_pass 127.0.0.1:8080; | |
fastcgi_param PATH_INFO $fastcgi_script_name; | |
fastcgi_param REQUEST_METHOD $request_method; | |
fastcgi_param QUERY_STRING $query_string; | |
fastcgi_param CONTENT_TYPE $content_type; |
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/python | |
"""Replacement for htpasswd""" | |
# Original author: Eli Carter | |
import os | |
import sys | |
import random | |
from optparse import OptionParser | |
# We need a crypt module, but Windows doesn't have one by default. Try to find |
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
server{ | |
server_name www.ejemplo.com ejemplo.com; | |
auth_basic "Acceso restringido, solo permitido mediante credencial"; | |
auth_basic_user_file /var/www/archivo.access; | |
location / { | |
# host and port to fastcgi server | |
fastcgi_pass 127.0.0.1:8080; | |
fastcgi_param PATH_INFO $fastcgi_script_name; | |
fastcgi_param REQUEST_METHOD $request_method; |
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 | |
BIND=127.0.0.1:9000 | |
USER=www-data | |
PHP_FCGI_CHILDREN=15 | |
PHP_FCGI_MAX_REQUESTS=1000 | |
PHP_CGI=/usr/bin/php-cgi | |
PHP_CGI_NAME=`basename $PHP_CGI` | |
PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND" | |
RETVAL=0 |
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 -e | |
SUPERVISORD=/usr/local/bin/supervisord | |
PIDFILE=/tmp/supervisord.pid | |
OPTS="-c /etc/supervisord.conf" | |
test -x $SUPERVISORD || exit 0 | |
. /lib/lsb/init-functions |
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
syntax on | |
filetype indent plugin on | |
au FileType python setlocal tabstop=8 expandtab shiftwidth=4 softtabstop=4 | |
"F2 activa y desactiva el auto-indent para poder pegar sin que se dañe el | |
""contenido | |
nnoremap <F2> :set invpaste paste?<CR> | |
nnoremap <F8> :tabn<CR> | |
nnoremap <F7> :tabp<CR> | |
set pastetoggle=<F2> |
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
import itertools | |
import subprocess | |
archivo = open("disponibles","a") | |
for LENGTH in range(3,8): | |
a = itertools.product("ABCDEFGHIJKLMNOPQRSTUVWXYZ",repeat=LENGTH) | |
for each in a: | |
domain = "".join(each)+".com" | |
print domain |
OlderNewer