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
""" | |
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
#!/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
#!/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
(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
function trackLink(category, action, opt_label) { | |
var id = GGANA_GLOBAL_ID; | |
console.log("track:::", id); | |
console.log("track:::", category, action, opt_label); | |
var ret = _gat._getTracker(id)._trackEvent(category, action, opt_label); | |
console.log("track:::", ret); | |
} | |
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
 | |
Software libre para empresas | |
---------------------------- | |
_por @zodman_ | |
! | |
¿Qué es tryton? |
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 random | |
def get_near_point( lat,lng, radius): | |
""" http://gis.stackexchange.com/questions/25877/how-to-generate-random-locations-nearby-my-location""" | |
import math | |
u = random.random() | |
v = random.random() | |
r_d = radius/111300.0 | |
t = 2* math.pi*v | |
w = r_d * math.sqrt(u) | |
x = w* math.cos(t) |