domingo, marzo 20, 2011

rage against the ukelele

andaba buscando una guitarra chiquita para poder llevar a los viajes sin tener que pagar por equipaje extra y vi este video


lo cual resulto en

foto gentilmente cedida por mi hermano
la razon del titulo es que anoche fuimos a ver una banda tributo a rage against the machine llamada enraged que sono muy bien.




ahora a encontrar una bicicleta...

jueves, marzo 17, 2011

windows es osom

tengo que instalar SQL express no se que para el laburo

  1. bajo el instalador después de googlear
  2. lo ejecuto
  3. se desempaca
  4. loading...
  5. necesitas .NET framework 3.5 SP1!
  6. me da una url, la cual visito
  7. me dice que salio .NET 4.0 que incluye 3.5 y todos los SPs
  8. lo bajo
  9. ejecuto
  10. baja mas cosas
  11. repita de 2 a 4
  12. repita 5!
  13. busco en google y bajo .NET framework 3.5 SP1
  14. ejecuto
  15. baja mas cosas
  16. éxito!
  17. repita de 2 a 4
  18. necesita windows installer 4.5!
  19. busco en google eso
  20. lo bajo
  21. lo ejecuto
  22. me dice que para instalar windows installer tengo que cerrar windows installer (?)
  23. le doy que si
  24. instala
  25. unilateralmente me reinicia la maquina (o quizás me lo advirtió en algún lado, ni idea)
  26. se queda en "shuting down"
  27. después de un rato le doy hard reset
  28. arranco de nuevo
  29. que estaba haciendo?
  30. ahh, SQL express no se que.., corro el instalador
  31. le doy a instalar
  32. corre un check
  33. no tenes power shell!
  34. busco power shell en google, llego a una pagina, muchos links
  35. elijo uno random, acerte!
  36. me lleva a otra pagina que dice que tengo que correr Windows Genuine Check (no WPA, es otro que genera un código)
  37. bajo eso
  38. lo ejecuto
  39. me da un código con un boton "copy to clipboard"
  40. lo copio y lo pego en la pagina
  41. me lleva de nuevo a la pagina de #35
  42. le doy download
  43. ejecuto
  44. next, I agree, next, finish (no los puse en todos porque se haria denso)
  45. en que estaba? ahh SQL express no se que..
  46. re run el check, next, next, next, next, Install, next, finish

lunes, marzo 14, 2011

PubHubSubBub Developer Tutorial

Note: the project and this document are hosted here: https://github.com/marianoguerra/pshb-example improvements and corrections are welcome!

welcome, this document contains an example application written in python that will help you play with a pshb (pubsubhubbub from now on) hub and an application that publishes its content to it.

this guide explains how to install a pubsubhubbub server in your computer so you can play with it, normally on a web application you would use a pshb compatible server like:

 

Requirements

 

  • python >= 2.5 (I'm using 2.6.1)
  • git (for the example)
  • subversion (to download pshb code)
  • bash or similar shell to run the scripts

 

Installing

 

git clone https://github.com/marianoguerra/pshb-example.git
cd pshb-example
bash setup.sh
the first command will fetch the project from github, the third one will get some libraries needed for the example to run.

note: answer "y" to sammy and "n" to all the other questions that the script does (we don't need those libraries)

 

Running

 

now we will start the example application called pleinu twice (so we can test the communication using the hub) and we will start a local pshb hub.

open 3 terminals and run one comment on each one:

google_appengine/dev_appserver.py src/ -p 8000 --datastore_path=/tmp/tubes1
google_appengine/dev_appserver.py src/ -p 8001 --datastore_path=/tmp/tubes2
google_appengine/dev_appserver.py pubsubhubbub/hub/
this commands asume that you are at the root of the pshb-example folder.

 

Playing

 

open a browser tabs pointing to:
click the signup link and create a new user.



I will create one called spongebob, you will have to change the username whenever you see it.



after the signup process click the login button and enter the user and password you just entered.



create a message and click send, the message should appear below.





now go to http://localhost:8000/atom/messages/from/spongebob/



you should see an atom feed with the message you just created.

 

Publishing

 

now that we have a page that generates information we need to publish it on the hub.

open a tab in your browser pointing to http://localhost:8080/ and click on the publish link near the bottom.



if you get an error remove the s from the https protocol in the address bar and refresh.



on the Topic field enter the url to the atom feed we saw before: http://localhost:8000/atom/messages/from/spongebob/



and click Publish, the page wont change, that's ok.

 

Subscribing

 

now we need to subscribe one user from the other site (http://localhost:8001/) to the messages sent by our user.

go to http://localhost:8001/ and create another user, I will call it patrick



in the main page of the hub (http://localhost:8080/) click on the subscribe like near the bottom

enter http://localhost:8001/p/notify/patrick/ on the Callback field (change patrick for your username if you used another one) enter http://localhost:8000/atom/messages/from/spongebob/ on the Topic field (change spongebob for your username if you used another one)



click the "Do it" button, the page won't change, that's ok.

 

Sending a message

 

Go to http://localhost:8000/ (login if you closed it) and send a message.



 Now go to http://localhost:8001/ and refresh the page, you should see the messages published by the user in the other site.



Note


to make it work and avoid an exception I had to add a return statement at the beginning of the log_message function at google_appengine/google/appengine/tools/dev_appserver.py

if you get that exception like this:

in log_request
    self.requestline, str(code), str(size))
  File "/home/asd/pubsubhubbub/pshb/google_appengine/google/appengine/
tools/dev_appserver.py", line 3314, in log_message
    if self.channel_poll_path_re.match(self.path):
AttributeError: DevAppServerRequestHandler instance has no attribute
'path'
edit the function to look like this:
 
def log_message(self, format, *args):
  """Redirect log messages through the logging module."""
  return
  if self.channel_poll_path_re.match(self.path):
    logging.debug(format, *args)
  else:
    logging.info(format, *args)



you will have to set write permissions to the file to save it (chmod u+w dev_appserver.py)



you will have to restart the pshb server:


google_appengine/dev_appserver.py pubsubhubbub/hub/

miércoles, marzo 09, 2011

campania por un futuro mas matematico y divertido

logremos que la creadora de http://vihart.com/ se case con el creador de http://xkcd.com/ y den a luz a una nueva generación de matemáticos artisticamente hábiles que dominaran el mundo for fun and profit.

atte.

la administración

Seguidores

Archivo del Blog