Verbose Logging

software development with some really amazing hair

T + G I F R

Articles tagged with "javascript"

The What, Why, and How Of Kindlebility

· Posted in Programming
Kindlebility is now Tinderizer TL;DR Kindlebility sends articles on the web to your Kindle. It needs your Kindle email address (@free.kindle.com addresses are fine). I don’t store your Kindle address or use it for anything else. Use Kindlebility to make a bookmarklet. Add kindle@darkhelmetlive.com to your Kindle Approved Email List. Click the bookmarklet on a page to send the article to your Kindle. Moving on I’ve been meaning to write some more…

kindlebility Open To The World

· Posted in Software
In my previous post, I talked about kindlebility, my little nodejs application for sending articles to your Kindle. It was initially just built for one person, but then I was like “screw it”, and opened it up to the world. I gave it a nice(ish) front page, an explanation, and a builder for the bookmarklet. I used zepto for the Javascript stuff, and the Google Font Directory for some nice fonts. All you need to do is drop either of your Kindle em…

2 Node.js Apps That Showed Me The Light

· Posted in Programming
I don’t know if you know this, but everybody and their dog is writing node.js applications. It’s more popular than Kanye memes. It’s a contagious bug, and I caught it too. I had a one specific use case that it was perfect for, since a Javascript library already existed to do it. Another idea came later, and that’s the one that started it for me. So let’s get on with that. shortestpaper This was the one I started on. The basic problem was that mo…

A Better jQuery Script For Embedly

· Posted in Programming
Embedly is a great service for generic embedding of content. Have you seen posterous? How they can just accept any link to a video on youtube, a picture on flickr, whatever, and it gets properly embedded? I imagine they could use Embedly to accomplish that. Anyway. They have a jQuery script to do embedding, but in the middle of if is this behemoth of a code smell: Oh noes a global variable! The implication of this is that you can only run one ca…

Hijack AJAX Requests Like A Terrorist

· Posted in Programming
AJAX requests are a grand thing. They let you request things from your server without refreshing the page. Now, if you are trying to proxy a page, you can rewrite all the links in the page to point back through your proxy, but AJAX requests are another thing. Oh wait no they're not! You can't rewrite them when you proxy the page (by proxy, I mean you request my page with a URL param to another page, and I pull in that page, do some stuff, and se…

Making nth-child Work Everywhere

· Posted in Programming
The nth-child pseudo selector is a nice feature in CSS3. Well, most of the things in CSS3 are pretty sweet. Chris Wanstrath has a good post on the nth-child selector, and I'd suggest reading it for a bit more in depth on what the nth-child selector actually does, as I just cover getting the same effect in all browsers. Unfortunately, while Internet Explorer does support some of the CSS3 stuff, it doesn't support a bunch of them.aspx) either. (Di…

swfobject, Meet jQuery

· Posted in Software
I was getting sick and tired of just blindly copying and pasting embed code for videos and every other flash thing I post. Naturally, being a programmer I had to do something about it. Enter jQuery and swfobject Check this out: Some embed tags that are provided are only of one type: either object or embed. This is no good since that means some browsers are excluded and it won't work. Lame! Swfobject solves the problem by using JavaScript to inse…

Unescape HTML With Javascript

· Posted in Software
I'm just passing this on, as I didn't do it, I just found it. Over here is a pretty slick way to unescape HTML. I ran into the need for this when I was working on some inline-editing code. I wanted to reset the contents of the textarea to the contents of a pre tag. The contents of the tag are of course escaped, but I want them to be proper HTML in the textarea. Using this trick allowed me unescape the contents easily and stuff it back in the tex…

Simple jQuery Timeout

· Posted in Programming
I needed jQuery to fadeout an item after a certain timeout, and I found it odd that I couldn't find a native jQuery way to do it. Whatever. jQuery is so awesome that it doesn't matter, because here's what I came up with. EDIT 28-Nov-2009 In retrospect, all I wanted was a jQuery like syntax, but leveraging jQuery to do the timeout is sort of wrong. After all, Javascript does have a setTimeout function. I must have been in a jQuery must do all of …

Wordpress Multipart Posts, Inlined With jQuery: Part 2

· Posted in Programming
(See (remote-inline)Part 1) And we're back! So, just take a look up below the title…see that little link? Yeah go ahead and click that. If I did my job right (tested in Safari on Windows, Chrome, FF), the contents for Part 1 should slide in above this post. In this post, since I use the Textile 2 plugin, I add this snippet at the top: (See [(remote-inline)Part 1](/2009/07/08/wordpress-multipart-posts-inlined-with-jquery-part-1)) In textile land,…

Wordpress Multipart Posts, Inlined With jQuery: Part 1

· Posted in Programming
This is the first of a multipart post. I'll be the first to admit, after you read this, and part 2, ignoring the context and concentrating on the actually content, you'd wonder why, but it makes sense when it's all together. So I've seen many multipart posts out there, do this today, tomorrow do this, and every time, in order to view them all together, you, um, can't. You have to have multiple tabs open and read one, then read the next, flipping…

Einstein@Home Statistics In Wordpress Sidebar

· Posted in Programming
If, like me, you participate in some sort of grid computing project, it's interesting to see your progress. I take part in Einstein@Home, and I wanted to display my stats in my sidebar (on my other blog). I'll give you two ways to accomplish this. First way is the quick way, which involves including the jQuery Javascript library, and a second which involves writing your own Javascript. The second option results in a smaller file, but the jQuery …