Técnicamente, eres un p**dejo si compras cosas en dólares

https://www.youtube.com/watch?v=xvGjXuYzUZ0

Lo que estos cuates suponen es que todo, absolutamente TODO lo que compras está hecho en méxico y con materiales 100% nacionales. Y que todos y absolutamente TODOS los mexicanos estamos en la misma onda.

México no es un lugar donde se consuman bienes de otros lados, nada que pensar de consumir cosas como televisores, computadoras, videojuegos, carros (aunque muchos son manufacturados en méxico), o gasolina, asi de fácil, que si no toda la gran mayoría se refina en el extranjero. Eso es lo que piensan o quieren hacer creer al público. read more

Worth every cent

  
We gave this iPad to Sofia last year as a birthday gift. But the iPad companion was that griffin survivor case.

Sofia, Diego and Ana have dropped that thing a lot of times, stepped over it, draw on it (with crayons), and of course water.

The iPad is still working and no scratches or dents on it. That case is worth every cent I paid for it

A mis amigos que se quieren poner en forma

De verdad, espero que lo logren, pero de verdad lo deseo.

Solo recuerden que nadie más lo va a hacer por ustedes y que si fallan la culpa no la tiene  nadie más que ustedes. Si lo quieren hacer háganse el tiempo, sacrifíquense y háganlo. No pongan pretextos ni culpen a la falta de voluntad/tiempo. Solo háganlo.

Ps. Imagen de pictoline, hagan click en ella para ir al post original.

What makes a Mac a Mac


I think that Macs are expensive computers, but any other computer with the same hardware should cost more or less the same.

Yes, you can get cheaper computers with the same processor, more storage and the same amount of ram, but is not just CPU-RAM-HDD what makes a computer a good computer. Is everything that is around those.


The display, the quality of construction, the durability of the keyboard, the battery   and I don’t mean just getting 10 hours of battery, I mean how many years that battery is going to work fine. read more

So, we went to watch the new Star Wars

  
And although it was good, to me it was not a memorable movie, better than the first three episodes yes, better than the 4-6 ? No.

A couple of spoilers alter. Stop reading if you haven’t seen the movie yet.

Basically the same, Rebels vs The bad guys. They even had the killed parent. The different part is that the Jedi is a woman now (trying to be inclusive?) and there’s a bit more of humor with chewbacca and Han Solo.

Also, Kylo Ren is the worst villain I’ve ever seen in Star Wars. Just think about this: a fucking storm trooper hit him with a laser blade. Kylo could just use the force a twist his neck and No more Finn for the saga. Also, a girl with no training who discovered her Jedi powers 15 minutes before beat the ass of Kylo, a Commander of the dark side… read more

Python: Simple HTTP Server on python.

(Repost from old blog)

Python have several modules that help you to achieve your goals. This week, on my spare time that is getting every day more scarce I spend time figuring out how to create a Python Web Server, I was planing to use it over an application that I’m developing on ICT Consulting. At the end I didn’t use it because I didn’t want a “passive” communication, but probably I will use this code on the CRM Desktop application that we use here.

Anyway, this code may be helpful for you too. I found that creating a small web server is really simple, It starts getting bigger as you add functions to that web server, but the basis is quite simple.

import os import cgi import sys from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler class customHTTPServer(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header('Content-type', 'text/html') self.end_headers() self.wfile.write('<HTML><body>Get!</body></HTML>') return def do_POST(self): global rootnode ctype,pdict = cgi.parse_header(self.headers.getheader('Content-type')) if ctype == 'multipart/form-data': query = cgi.parse_multipart(self.rfile, pdict) self.send_response(301) self.end_headers() self.wfile.write('Post!') def main(): try: server = HTTPServer(('',8080),customHTTPServer) print 'server started at port 8080' server.serve_forever() except KeyboardInterrupt: server.socket.close() if __name__=='__main__': main() read more

Image as background in a Gtk Application.

(Reposted from the old blog)

This time I’m going to talk about putting an image as the application background in Gtk. In Gtk we are used to leave the colors of the application to the theme, but sometimes we will need to use an image as background. I already wrote how to draw a pixbuf in a gtk.DrawingArea (Esp), we could use that, but we will “draw” directly on the widget window instead.

Yes, I said the widget’s window instead the widget itself. You should know that every widget that has been packed in a container has a gtk.gdk.window object and is the responsible for containing your widget. Well, we can draw on that object.

What we need is to create a simple gtk.gdk.Pixbuf and call the gtk.gdk.window.draw_pixbuf method using your widget.window object on the expose-event.

The code should look like this:

#!/usr/bin/env python import gtk def draw_pixbuf(widget, event): path = '/home/markuz/wallpapers/WMwall1024x768.gif' pixbuf = gtk.gdk.pixbuf_new_from_file(path) widget.window.draw_pixbuf(widget.style.bg_gc[gtk.STATE_NORMAL], pixbuf, 0, 0, 0,0) window = gtk.Window() window.set_title('Drawing Test') window.set_size_request(640,480) window.connect('destroy',gtk.main_quit) hbbox = gtk.HButtonBox() window.add(hbbox) hbbox.connect('expose-event', draw_pixbuf) button = gtk.Button('Press Me!') hbbox.pack_start(button, True, False, 10) window.show_all() gtk.main() read more