php: recaptcha klase bihurtute

Eztaitz iñoiz recaptcha-gaz inbazuien bihar baie funtziño sueltuekaz bihar eitzie ez dast gustaten bapez eta klase batera pasa dot: recaptcha.class.php <?php /* * This is a PHP library that handles calling reCAPTCHA. * – Documentation and latest version * http://recaptcha.net/plugins/php/ * – Get a reCAPTCHA API Key * https://www.google.com/recaptcha/admin/create * – Discussion group * http://groups.google.com/group/recaptcha […]

python: gaurko erabiltzaile batzun tweet-ek wordpress-en publike

Hamen azken fiñien script-e akabata #!/usr/bin/env python # -*- coding: utf-8 -*- import sys import urllib import datetime as date import time import simplejson as json import re import MySQLdb def getTweets(id):     now = date.datetime.now().strftime(“%Y-%m-%d”)     url = “http://search.twitter.com/search.json?q=+from%3A”+u+”+since%3A”+now     json_text = urllib.urlopen(url).read()     json_obj = json.loads(json_text)     tweets = []     for result […]

Firefox barridxekaz bateragarridxe EZ dan Add-on bat instala

Neurelez firefox-egaz “bersionitis” badakozuie, padako datzuie ezin’zuiela “Add-on” batzuk instala, adibidez nire kasuen firebug, horretarako haunek pausuek jarraitu: Lehenengo eta behin zip eta unzip instala su aptitude install zip unzip exit Hasten gara: cd /tmp wget http://getfirebug.com/releases/firebug/1.8/firebug-1.8.0.xpi mv firebug-1.8.0.xpi firebug.zip mkdir firebug unzip firebug.zip -d firebug nano firebug/install.rdf idatz-zatidxen barruen hurrengo tag-a aldatu zeuon firefox […]

python: adierazpen erregularrakaz (regex) link-ek html-ra bihurtu

baguez kallue hartzien python-eri, oingutan texto batetik link-ek html-ra pasa’kuz #!/usr/bin/env python # -*- coding: utf-8 -*- import re text = “http://aaaaa       https://bbbbb ftp://ccccc\n http://dddddddd” m = re.sub(r'(?i)(^|\s+|\A)(http|https|ftp)(\://\S+)(\s+|\Z|$)’, ‘\\1<a href=\”\\1\\2\” onclick=\”window.open(this.href); return false;\”>\\2\\3</a>\\4’, text) print m Erantzune:   <a href=”http://aaaaa” onclick=”window.open(this.href); return false;”>       <a href=”https://bbbbb” onclick=”window.open(this.href); return false;”> <a href=”ftp://ccccc” onclick=”window.open(this.href); return false;”>  <a href=”http://dddddddd” […]

debian: nginx erabilitze web zerbitzaridxen cluster bat sortu

Danok dakigu web zerbitzaridxen txeriffe apache dala, baie beste web zerbitzari batzuk be biarra elegante eitzen dauie, adibidez lighttpd, cherokee edota nginx. Oingutan nginx-eri emongotzagu sue: su aptitude install nginx nano /etc/nginx/nginx.conf Oin nginx konfigureku: # usuaidxue eta grupue zeon gustora imiñi user zital zital; worker_processes 4; pid /var/run/nginx.pid; events { worker_connections 15; multi_accept on; […]