Posted: 2009-02-26 12:36:10
I don't usually do tech related posts here, but I figured I would today, because I'm bored and just encountered a problem that required some creative thinking.
For all you people not interested in web development, feel free to skip over this post.
So here's the dilemma. Our client has a website that is built in a CMS which results in all the pages being strict html (ie. ending with a .html extension). He has a blog hosted at blogspot and wishes to have his most recent blog posts displayed on his site.
Normally, this could be done using php to read his blog's RSS feed and embed the posts in his site. However, since his pages cannot end in .php, there is no way to directly embed the php code in his pages. (In order for php to process a page, and thus make use of any php code within a page, it must end in .php so the page goes through the processor).
In comes the problem solving. My original idea was to just use a bit of JavaScript to make an AJAX call to the server and call my standalone php file, returning the html to be displayed. This, however, is a little overkill, and has a chance for some interesting mistakes if the AJAX request returns before the rest of the page is finished loading. Which lead to my next idea:
My php script could create some javascript which would in turn create the html. Follow me? Here's the deal, I use some javascript in the page that has my php file as its source. The php file outputs javascript, so this should be a valid js source. The js that my php outputs is the html of the rss that the php read. Make sense? Good.
Turns out, this works. So, instead of just putting php on the page and having it output html, I put javascript on the page that called php which produced javascript that produced html. Seems like more work that was necessary, but for this scenario, it worked.
I think, when time allows, I'm going to write a basic RSS consumption php script that does just this, with a few user-submitted arguments, so that anyone can put their blog feed anywhere with just a little bit of javascript.
I'm ambitious :)
Leave a Comment || View Comments (4)
Posted: 2009-02-25 09:05:13
So, I was just in the lavatory, doing some paper work, and I happened to catch a glimpse of the tag on my underwear. It told me what size they were, each in EURO (M), US (M), CA (M), and CN (175/84a).
Wait, WHAT!?!?! It's a medium in all of europe, the US, and Cananda (and things are usually bass ackwards in Canadia). But in China, the size is 175/84a. That is just fucked up. I'd hate to try and find a shirt in my size, something like 130/54psq/#$__H3.
Leave a Comment || View Comments (1)
Posted: 2009-02-24 08:13:49
Lent starts tomorrow, 40 days of "fasting" before Easter. I don't know anyone who actually fasts, but it is typical among the Christians to give up one of their vices for 40 days. A sort of "I know I could never actually fast for 40 days like Jesus, but this is along those same lines, plus the Church told me to" kind of things.
Now, that's all well and good, feel free to practice your religion. I've even partaken in the Lenten practice a few time, giving up my vices such as sobriety, abstinence, and ballet.
But here's what gets me: Fat Tuesday. A day of gluttony, indulgence, and general debauchery. Mardi Gras (directly translated "Fat Tuesday"), to me, seems to be the one of the largest mass-hypocritical events ever. It is not unlike the bachelor sleeping with a prostitute the day before his wedding. It is waves upon waves of sin jam-packed into one day before you are supposed to be "holy".
Does no one else see something wrong with this? I mean, it's not like it is news to me that religions can be hypocritical, but this is just taking the cake (and eating it too).
[UPDATE] It has been brought to my attention that this article has the tone that religion, and in specific Christianity, is the hypocrite here. Though I do think that most religions can be quite hypocritical, the target of this post is the practitioners of the religion who exhibit this. I do not think that Fat Tuesday or Mardi Gras have ever expressly been in the Christian teachings, but I do think that in most instances, Fat Tuesday is directly associated with the following Christian practice of Lent. I am not a religious person, and that certainly shapes how I write in this blog. I have never claimed to write unbiasedly, and in fact I think I write with a very strong bias. But this blog is not about fair and unbiased reporting, it is a place for me to write about my own opinions.
All that said, I greatly appreciate the comments and discussions, and I can't wait to get this ugly-ass site redesigned so it's more pleasant to look at!
Feel the same? Think I'm a heathen? Let me know in the comments.
Leave a Comment || View Comments (8)
Posted: 2009-02-23 11:48:55
This past weekend I tried to buy a suit. When I graduated from college (not so long ago) my parents got me a suit. Turns out I knew nothing about style or fashion and I ended up with a suit that looks like I'm a 6 year-old wearing my dad's suit. So I decided, I have a bunch of weddings coming up that I need to go to, and I'd like a suit that I actually look good in.
I had seen a suit at Banana Republic a few weeks back that I really liked, and it just so happened that Amber had a 25% off coupon for Banana, so we went to check it out. Well, it turns out that I don't fit into a normal off-the-rack suit jacket. I am what the fashion world (and the ladies) call "long". The dude at Banana informed me that they do not carry "long" in the store, nor would anyone else on the strip (we were down by North and Clyborn).
I thought this was rather shocking. I mean, I'm tall, yes, but I didn't think I was 'specialty store' tall. I've never had to shop in a Big & Tall or anything. Granted, most clothing manufactures assume that, if you have a 32 inch waist, you're probably under 5 feet tall, and similarly, if you need a 34 inch inseam, you're probably well over 250lbs.

The man told me I could always shop at Banana online, to which I responded "I'm going to surgically attach your shins to your forearms so you don't fit into anything in this store" and stomped away.
I tried Express next, despite Mr. Banana Ass telling me that no store was going to carry the elusive "long". Express did, and I really wanted to go rub it in back at Banana, but I controlled myself and just tried on the suit at Express.
Discovery #2: I may be tall and skinny, but I am broad. I have broad shoulders and a narrow waist. I'm goddamn sexy as shit, but I don't fit into an off the rack suit jacket even if it is "long". (I don't know why I keep putting "long" in quotes. Is it more amusing that way?)
It didn't help that the gigantic anti-theft ink tag jabbed right into my sternum on the suit coat, but I had had enough of trying on suits in these stores that cater to "normal people". So we left and decided I needed someplace like a Men's Warehouse (where my current suit is from... so not too excited about that) or maybe a Macy's or something of the sort.
The next wedding is coming up in under a month, so I gotta at least get some pants that don't have a pleats. Because anyone who's watched at least one episode of What Not To Wear knows that pleats = big no no.
Leave a Comment || View Comments (1)
Posted: 2009-02-17 08:13:58
Ok, so I lied. You can no longer read my blog at urgack.blogspot.com. You are now forced to come here. I know it's ugly, but that will soon change. And you can still subscribe to the RSS feed (if you have troubles with this, please let me know, as it still might need some tweaking). You can still view all my posts, and comment and what not.
So suck it up, and enjoy reading all my thoughts here.
Leave a Comment || View Comments (2)
Posted: 2009-02-16 10:53:49
I spent last weekend in a small town in Michigan. Chelsea, to be exact. I town not unlike the one a grew up in, though outside of Ann Arbor instead of Chicago. It felt like the kind of town where old men sat out infront of corner stores smoking pipes and people had a lot of picnics. Nice and quiet.
The drive up there wasn't too long, and we had really good weather. It's funny driving into Michigan because the further in you get, the less you see foreign cars. I'm pretty sure my Subaru and I got the evil eye a few times. I am, after all, a Communist since I didn't buy a car made on U.S. soil (actually, it probably was made here...).
In other news, nothing else is new. Good bye.
Leave a Comment
Dave said:
Try this for your PHP RSS parsing. It's a pretty nice class. http://pear.php.net/package/XML_RSS
Jeff said:
Now I know how you feel when I blog about sports.
abnonsodome said:
i love you http://www.nike.com - nike
Brayboyjwn said:
ÿþAvez-vous jamais rencontré une situation où votre salaire mensuel en deçà de répondre aux besoins de base et encore moins des circonstances imprévues. En attendant le lendemain semble impossible? Si oui, alors il suffit dappliquer pour les prêts sur salaire pas de documents. Cette facilité de crédit sest avéré [url=http://www.suprashoespaschers.net]Supra Shoes Pas Cher[/url] être un bonheur financière pour tous ceux qui ont besoin dargent urgent, sans aucun retard. Une fois que vous avez appliqué à ce prêt, vous pouvez être assuré dobtenir des fonds dans le laps de temps le plus court possible. Ces prêts peuvent vous aider à surmonter les difficultés mois du milieu sans pour autant retarder les further.As les noms lindique, ces prêts peuvent être servis par rapport au salaire du mois suivant le chèque. En fait, ceux qui envisagent dappliquer à ce prêt ne doit pas être inquiet en cours de documentation de temps long et fastidieux. Pas ou peu de paperasse formalités faire de cette facilité de prêt lun des plus recherchés après les options parmi les demandeurs de prêts. Il permet déconomiser votre temps, dénergie et les efforts qui est par ailleurs consommés en mode traditionnel de applying.As une question de fait, lapplication à travers [url=http://www.suprashoespaschers.net]Ssupra shoes france[/url] Internet est un moyen sûr de projectile dacquérir ces prêts dans un délai rapide. Procédure appareil en ligne ne comporte aucune des formalités longues et coûteuses en temps et vous permettre ainsi de saisir les fonds dans le cadre le plus rapide du temps. Alors que le marché est inondé de prêt en ligne avec une pléthore de bailleurs de fonds, vous êtes sûr de trouver des offres qui correspondent à votre poche [url=http://www.suprashoespaschers.net]supra shoes[/url] ainsi que peut être facilement remboursé. En comparant différents devis voudrais juste faire des merveilles pour vous que vous pouvez facilement zéro sur un accord qui vous permet davoir un accès à des prêts funds.payday faciles sont une aubaine pour tous ceux qui ont un fond de crédit atroce. Même les gens ne peuvent bénéficier de prêts sans craindre de faire face à des rejets. Votre demande de prêt ne sera pas rejeté simplement à cause de vos antécédents de crédit épouvantable. Donc, la prochaine fois que vous vous retrouvez enfermé dans la pénurie financière, il suffit dappliquer pour cette propriétaires loan.Non et les locataires peuvent désormais prendre un nouveau respirer car ils ne plus avoir à faire face à la chaleur de la discrimination. Jusquà il ya quelques années, cette section de la société trouve quil est extrêmement difficile dobtenir les meilleures offres de prêt car ils nont pas atout précieux pour le donner en garantie. Cependant, avec ce prêt, elles peuvent facilement profiter des fonds, sans même donner une seconde pensée. Il est une bonne option pour aller en cas durgence certaine. [url=http://www.suprashoespaschers.net]supra shoes 2011[/url] Il rend la situation plus facile et plus commerciale. Il sagit dun accord de courte durée entre lemprunteur et le prêteur. Si vous êtes pressé dorganiser un peu dargent alors ce prêt peut être un moyen de sortir. Vous devrez peut-être cet argent pour vos factures délectricité, la facture des ménages, la fonction de mariage soudain, les frais de scolarité, tout examen médical et pour les autres raisons aussi.