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($){ | |
$.fn.invalid_chars = function(){ | |
return this.each(function(){ | |
var obj = $(this); | |
obj.unbind("keyup"); | |
obj.bind("keyup",function (e){ |
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
#!/bin/bash | |
# uwsgi - Use uwsgi to run python and wsgi web apps. | |
# | |
# chkconfig: - 85 15 | |
# description: Use uwsgi to run python and wsgi web apps. | |
# processname: uwsgi | |
PATH=/sbin:/bin:/usr/sbin:/usr/bin | |
DAEMON=/usr/local/bin/uwsgi |
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
#!/bin/bash | |
# uwsgi - Use uwsgi to run python and wsgi web apps. | |
# | |
# chkconfig: - 85 15 | |
# description: Use uwsgi to run python and wsgi web apps. | |
# processname: uwsgi | |
PATH=/sbin:/bin:/usr/sbin:/usr/bin | |
DAEMON=/usr/local/bin/uwsgi-2.7 |
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
""" | |
code: zodman | |
Fabric es una herramienta que uso desde mis proyectos para evitar realizar | |
tareas repetidas ( si lo hago mas de 2 veces hago un script). | |
Tiene una funcion especial que llama do_rebuild() esta funcion se encarga | |
de traers el ultimo log de svn y revisar palabras claves en el commit. | |
Dependiendo a esta palabra clave realiza una accion. |
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
def sixteenize(string, filler=" "): | |
fill=16-len(string)%16 | |
return string + filler*fill |
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 Crypto.Cipher import AES | |
from encoder import PKCS7Encoder | |
import base64 | |
#declared outside of all functions | |
key = '################' | |
mode = AES.MODE_CBC | |
iv = '\x00' * 16 | |
print (iv,) |
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
a = AES.new("1234567890123456",AES.MODE_CBC,'This is an IV456') | |
In [22]: sixteenize("andres") | |
Out[22]: 'andres ' | |
d= a.encrypt(sixteenize("andres")) | |
In [21]: base64.encodestring(d) | |
Out[21]: 'DnFT1bUDaLP7Y+8jgljWcQ==\n' |
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 -*- | |
""" Metodos de Autentificacion """ | |
from django.contrib.auth.backends import RemoteUserBackend, ModelBackend | |
from django.contrib.auth.models import User | |
from mosketeros.settings import LDAP_SERVER,LDAP_BIND,LDAP_SEARCH | |
class DjangoAuth(ModelBackend): | |
""" Autentificacion del framework """ | |
#create_unknown_user = False | |
#supports_anonymous_user = False |
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
import ldap | |
import pprint | |
# tomado de | |
# http://www.grotan.com/ldap/python-ldap-samples.html#search | |
# conectamos al active directory | |
l = ldap.open("10.0.0.203") | |
#hacemos un bind | |
# cn =test objecto |
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
Genshi==0.6 | |
PyWebDAV==0.9.8 | |
cdecimal==2.3 | |
egenix-mx-base==3.2.3 | |
lxml==2.3.4 | |
## FIXME: could not find svn URL in dependency_links for this package: | |
openoffice-python==0.1-20110209 | |
polib==0.7.0 | |
psycopg2==2.4.5 | |
pyOpenSSL==0.13 |