<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Posteet</title> 
    <link>http://www.posteet.com/</link> 
    <description>Recent posteets posted to Posteet</description>
    <ttl>60</ttl>

    
    <item>
        <title>python - twitter</title>
        <link>http://www.posteet.com/view/2095</link>
        <description>
        <![CDATA[<pre>#instalar python - twitter http://code.google.com/p/python-twitter/downloads/list

import twitter
import re
api      = twitter.Api(username, password)
#1. actualizar el estado
 api.PostUpdate('Tweet desde python ;)') #

#2. recuperar tus posts con links a otros uasuarios o los hashtags
    statuses = api.GetUserTimeline()
    posts=[]

    for s in statuses:
        tweet = s.text;
        hash_regex = re.compile(r'#[0-9a-zA-Z+_]*',re.IGNORECASE)
        user_regex = re.compile(r'@[0-9a-zA-Z+_]*',re.IGNORECASE)
        savelog(hash_regex,'hashR')
        savelog(smart_str(tweet),'tweet')
        for tt in user_regex.finditer(tweet):
            url_tweet = tt.group(0).replace('@','')
            tweet = tweet.replace(tt.group(0),
                    '&lt;a href=&quot;http://twitter.com/'+
                    url_tweet+'&quot; title=&quot;'+
                    tt.group(0)+'&quot;&gt;'+
                    tt.group(0)+'&lt;/a&gt;')

        for th in hash_regex.finditer(tweet):
                url_hash = th.group(0).replace('#','%23')
                if len ( th.group(0) ) &gt; 2:
                    tweet = tweet.replace(th.group(0),
                            '&lt;a href=&quot;http://search.twitter.com/search?q='+
                            url_hash+'&quot; title=&quot;'+
                            th.group(0)+'&quot;&gt;'+
                            th.group(0)+'&lt;/a&gt;');

        posts.append({'summary': tweet})</pre> <a href="http://www.posteet.com/tags/api">[api]</a>  <a href="http://www.posteet.com/tags/python">[python]</a>  <a href="http://www.posteet.com/tags/twitter">[twitter]</a> ]]>        </description>
        <dc:creator>macks</dc:creator>
        <pubDate>Fri, 06 Aug 2010 19:27:04 +0200</pubDate>

            <category>api</category>
            <category>python</category>
            <category>twitter</category>
    
    </item>

  
    <item>
        <title>Cómo manipular la altura de capas paralelas con JQuery</title>
        <link>http://www.posteet.com/view/2093</link>
        <description>
        <![CDATA[<pre>if ($(&quot;div#capa_1&quot;).height() &gt; $(&quot;div#capa_2&quot;).height()) {
            $(&quot;div#capa_2&quot;).height($(&quot;div#capa_1&quot;).height())
}else{
            $(&quot;div#capa_1&quot;).height($(&quot;div#capa_2&quot;).height())
 }</pre> <a href="http://www.posteet.com/tags/css">[css]</a>  <a href="http://www.posteet.com/tags/javascript">[javascript]</a>  <a href="http://www.posteet.com/tags/jquery">[jquery]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Tue, 27 Jul 2010 11:29:28 +0200</pubDate>

            <category>css</category>
            <category>javascript</category>
            <category>jquery</category>
    
    </item>

  
    <item>
        <title>Browse and print DOM Tree in PHP (debugging)</title>
        <link>http://www.posteet.com/view/2092</link>
        <description>
        <![CDATA[<pre>function walkDom($node, $level = 0) {
	$indent = '';
	for ($i = 0; $i &lt; $level; $i++)
	$indent .= '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'; //prettifying the output
	if (true /*$node-&gt;nodeType == XML_TEXT_NODE*/) {
		echo $indent.'&lt;b&gt;'.$node-&gt;nodeName.'&lt;/b&gt; - |'.$node-&gt;nodeValue.'|';

		if ( $node-&gt;nodeType == XML_ELEMENT_NODE ) {
			$attributes = $node-&gt;attributes; // get all the attributes(eg: id, class)
			foreach($attributes as $attribute) {
				echo ', '.$attribute-&gt;name.'='.$attribute-&gt;value;
			}							   
		}

		echo '&lt;br /&gt;';
	}

	$cNodes = $node-&gt;childNodes;
	if (count($cNodes) &gt; 0) {
		$level++ ; // go one level deeper
		foreach($cNodes as $cNode)
			walkDom($cNode, $level);
		$level = $level - 1;
	}
}</pre> <a href="http://www.posteet.com/tags/debug">[debug]</a>  <a href="http://www.posteet.com/tags/dom">[dom]</a>  <a href="http://www.posteet.com/tags/print">[print]</a>  <a href="http://www.posteet.com/tags/tree">[tree]</a>  <a href="http://www.posteet.com/tags/walk">[walk]</a>  <a href="http://www.posteet.com/tags/xml">[xml]</a> ]]>        </description>
        <dc:creator>spirit</dc:creator>
        <pubDate>Sat, 24 Jul 2010 17:20:38 +0200</pubDate>

            <category>debug</category>
            <category>dom</category>
            <category>print</category>
            <category>tree</category>
            <category>walk</category>
            <category>xml</category>
    
    </item>

  
    <item>
        <title>PIL +  pasar todos los formatos a jpg</title>
        <link>http://www.posteet.com/view/2090</link>
        <description>
        <![CDATA[<pre>image = Image.open(imageField)
if image.mode != &quot;RGB&quot;:
    image = image.convert(&quot;RGB&quot;)
    #big
    image.save('image.jpg')</pre> <a href="http://www.posteet.com/tags/django">[django]</a>  <a href="http://www.posteet.com/tags/PIL">[PIL]</a>  <a href="http://www.posteet.com/tags/python">[python]</a>  <a href="http://www.posteet.com/tags/soluciones">[soluciones]</a> ]]>        </description>
        <dc:creator>macks</dc:creator>
        <pubDate>Wed, 21 Jul 2010 22:42:56 +0200</pubDate>

            <category>django</category>
            <category>PIL</category>
            <category>python</category>
            <category>soluciones</category>
    
    </item>

  
    <item>
        <title>Manipulations classiques dans une arborescence de fichiers avec sed</title>
        <link>http://www.posteet.com/view/2089</link>
        <description>
        <![CDATA[<pre>Astuces très simples mais toujours utiles :

- Rechercher/remplacer une occurence dans toute une série de fichiers :
find mon_repertoire -type f -exec sed -i 's/occurence/remplacement/g' {} \;

- Supprimer les lignes contenant une occurence dans une série de fichiers :
find mon_repertoire -type f -exec sed -i 's/occurence/d' {} \;</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/find">[find]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/sed">[sed]</a> ]]>        </description>
        <dc:creator>koudou</dc:creator>
        <pubDate>Wed, 21 Jul 2010 08:52:35 +0200</pubDate>

            <category>bash</category>
            <category>find</category>
            <category>linux</category>
            <category>sed</category>
    
    </item>

  
    <item>
        <title>Conversion de fichiers de latin1 à UTF8.</title>
        <link>http://www.posteet.com/view/2087</link>
        <description>
        <![CDATA[<pre>Le logiciel convmv effectue la conversion des noms de fichiers contenus dans &quot;répertoire/&quot; de latin1 vers UTF8 :
convmv --notest -r -f latin1 -t utf-8 répertoire/

L'outil iconv convertit le contenu des fichiers :
iconv -f latin1 -t utf-8 textISO.txt &gt;&gt; textUTF8.txt</pre> <a href="http://www.posteet.com/tags/iso">[iso]</a>  <a href="http://www.posteet.com/tags/latin1">[latin1]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/utf-8">[utf-8]</a> ]]>        </description>
        <dc:creator>koudou</dc:creator>
        <pubDate>Sun, 11 Jul 2010 20:07:48 +0200</pubDate>

            <category>iso</category>
            <category>latin1</category>
            <category>linux</category>
            <category>utf-8</category>
    
    </item>

  
    <item>
        <title>Quelques commandes pour régler la date sous Linux</title>
        <link>http://www.posteet.com/view/2086</link>
        <description>
        <![CDATA[<pre>date : donne la date locale
date -u : donne la date universelle (temps universel continu UTC)
date --set 12:34:56 : modifier la date locale
sudo hwclock --show : affiche la date du BIOS
sudo hwclock --set --date=&quot;12:34:56&quot; : fixe l'heure du BIOS (en heure locale)
sudo hwclock --systohc : force la date du BIOS à se mettre à la date du système
sudo hwclock --hctosys : force la date système à se mettre à la date du BIOS</pre> <a href="http://www.posteet.com/tags/date">[date]</a>  <a href="http://www.posteet.com/tags/heure">[heure]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a> ]]>        </description>
        <dc:creator>koudou</dc:creator>
        <pubDate>Sun, 11 Jul 2010 19:57:16 +0200</pubDate>

            <category>date</category>
            <category>heure</category>
            <category>linux</category>
    
    </item>

  
    <item>
        <title>Identifier le matériel et les pilotes nécessaires sous Debian et dérivés</title>
        <link>http://www.posteet.com/view/2085</link>
        <description>
        <![CDATA[<pre>Il suffit de coller le résultat de la commande lspci -n dans le formulaire de la page suivante :
http://kmuto.jp/debian/hcl/ 
pour obtenir la liste du matériel, des fabricants et des pilotes de votre PC.</pre> <a href="http://www.posteet.com/tags/debian">[debian]</a>  <a href="http://www.posteet.com/tags/driver">[driver]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a> ]]>        </description>
        <dc:creator>koudou</dc:creator>
        <pubDate>Sun, 11 Jul 2010 19:49:30 +0200</pubDate>

            <category>debian</category>
            <category>driver</category>
            <category>linux</category>
    
    </item>

  
    <item>
        <title>sql querys - debug django</title>
        <link>http://www.posteet.com/view/2084</link>
        <description>
        <![CDATA[<pre>from django.db import connection
q = connection.queries # todos los querys y los tiempos de respuesta

savelog(obj.query,'query')  # query de una consulta</pre> <a href="http://www.posteet.com/tags/django1.2">[django1.2]</a>  <a href="http://www.posteet.com/tags/querys">[querys]</a> ]]>        </description>
        <dc:creator>macks</dc:creator>
        <pubDate>Fri, 09 Jul 2010 00:57:07 +0200</pubDate>

            <category>django1.2</category>
            <category>querys</category>
    
    </item>

  
    <item>
        <title>extender auth_user django modificando campos -- (aplicando herencia)</title>
        <link>http://www.posteet.com/view/2083</link>
        <description>
        <![CDATA[<pre>#1
from django.db import models
from django.contrib.auth.models import User, UserManager

class CustomUser(User):
    birthday = models.DateField()
    activation_key = models.CharField(max_length=255, blank=True, default='')
    photo_url = models.CharField(max_length=50, blank=True) # cant incrementada de votaciones
    User._meta.get_field('username')._unique = False
    User._meta.get_field('email')._unique = True
    User._meta.get_field_by_name('username')[0].max_length=75

#2 save child class
from users.models import CustomUser
def saveCustomUsers(request):
    usr = CustomUser()
    usr.username = 'macks'
    usr.password = '123456'
    usr.activation_key = 'sfsdf123456'
    usr.birthday = datetime.now()
    usr.photo_url = 'image.jpg'
    usr.save()</pre> <a href="http://www.posteet.com/tags/clases">[clases]</a>  <a href="http://www.posteet.com/tags/django">[django]</a>  <a href="http://www.posteet.com/tags/herencia">[herencia]</a>  <a href="http://www.posteet.com/tags/python">[python]</a>  <a href="http://www.posteet.com/tags/soluciones">[soluciones]</a> ]]>        </description>
        <dc:creator>macks</dc:creator>
        <pubDate>Fri, 25 Jun 2010 19:42:32 +0200</pubDate>

            <category>clases</category>
            <category>django</category>
            <category>herencia</category>
            <category>python</category>
            <category>soluciones</category>
    
    </item>

  
    <item>
        <title>MySQL permissions for backup</title>
        <link>http://www.posteet.com/view/2082</link>
        <description>
        <![CDATA[<pre>GRANT SHOW DATABASES, SELECT, LOCK TABLES, RELOAD ON *.* to backup@localhost IDENTIFIED BY 'password';
FLUSH PRIVILEGES;</pre> <a href="http://www.posteet.com/tags/backups">[backups]</a>  <a href="http://www.posteet.com/tags/mysql">[mysql]</a>  <a href="http://www.posteet.com/tags/readonly">[readonly]</a>  <a href="http://www.posteet.com/tags/security">[security]</a>  <a href="http://www.posteet.com/tags/user">[user]</a> ]]>        </description>
        <dc:creator>spirit</dc:creator>
        <pubDate>Sat, 19 Jun 2010 18:21:25 +0200</pubDate>

            <category>backups</category>
            <category>mysql</category>
            <category>readonly</category>
            <category>security</category>
            <category>user</category>
    
    </item>

  
    <item>
        <title>configuration solidircd</title>
        <link>http://www.posteet.com/view/2081</link>
        <description>
        <![CDATA[<pre>si problème à la ligne 43 sur le nom du serveur, il faut au minimum un point dans le nom.</pre> <a href="http://www.posteet.com/tags/irc">[irc]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/service">[service]</a>  <a href="http://www.posteet.com/tags/solidircd">[solidircd]</a> ]]>        </description>
        <dc:creator>neorom</dc:creator>
        <pubDate>Sat, 19 Jun 2010 01:29:03 +0200</pubDate>

            <category>irc</category>
            <category>linux</category>
            <category>service</category>
            <category>solidircd</category>
    
    </item>

  
    <item>
        <title>incluir variables generales a la plantilla-- inclusion tags</title>
        <link>http://www.posteet.com/view/2079</link>
        <description>
        <![CDATA[<pre>#agregar templatetags a APPS de settings

1.-
apps/templatetags/userInfoTag.py

# -*- coding: utf-8 -*-
from django import template
from django.shortcuts import get_object_or_404
from django.contrib.auth.models import User

register = template.Library()
@register.inclusion_tag('admin/users/inclusionTags/userRecordsTags.html', takes_context=True)
def userRecords(context):
    request = context['request']
    user = get_object_or_404(User, id=request.user.id)
    userName = user.first_name + ' ' + user.last_name
   
    return {'userName': userName}

2.-
apps/templatetags/__init__.py
from django.template import add_to_builtins
add_to_builtins('templatetags.userInfoTag')

3.-
templates/admin/users/inclusionTags/userRecordsTags.html
{{ userName }} # return value of userInfotag.py

4.- 

#se puede usar la plantilla userRecords.html en culaquiera otra plantilla

templates/admin/users/indexSuccess.html
&lt;td&gt;{% userRecords %}&lt;/td&gt;  #def userRecords</pre> <a href="http://www.posteet.com/tags/django">[django]</a>  <a href="http://www.posteet.com/tags/python">[python]</a>  <a href="http://www.posteet.com/tags/soluciones">[soluciones]</a>  <a href="http://www.posteet.com/tags/utiles">[utiles]</a> ]]>        </description>
        <dc:creator>macks</dc:creator>
        <pubDate>Wed, 16 Jun 2010 19:35:53 +0200</pubDate>

            <category>django</category>
            <category>python</category>
            <category>soluciones</category>
            <category>utiles</category>
    
    </item>

  
    <item>
        <title>query - case sensitive en mysql</title>
        <link>http://www.posteet.com/view/2078</link>
        <description>
        <![CDATA[<pre>SELECT *  FROM `table`  WHERE BINARY `column` = 'value'</pre> <a href="http://www.posteet.com/tags/mysql">[mysql]</a> ]]>        </description>
        <dc:creator>macks</dc:creator>
        <pubDate>Fri, 28 May 2010 17:44:37 +0200</pubDate>

            <category>mysql</category>
    
    </item>

  
    <item>
        <title>obtener sentias SQL de un query de django</title>
        <link>http://www.posteet.com/view/2077</link>
        <description>
        <![CDATA[<pre>savelog(media.query.as_sql())</pre>]]>        </description>
        <dc:creator>macks</dc:creator>
        <pubDate>Wed, 26 May 2010 22:59:51 +0200</pubDate>

    
    </item>


</channel>
</rss>
