Twitter

Categories

JavaScript

Need a fast CDN for almost every JavaScript framework?

Usually a browser restricts the number of simultaneous connections to a single domain (depending on the browser 2-8 connections). That’s why Yahoo recommends to use a Content Delivery Network (CDN) to decrease the number of connections to the same domain. Lately I’ve been experimenting with…

Chrome, JavaScript, jQuery

Using Chrome’s XPath with jQuery

While working with the Chrome Developer Tool I’ve discovered that you can retrieve the XPath of a selected node, But… it only works in Chrome. So what about other browsers? What about jQuery? What about querying documents that resulted from an AJAX request?

PowerShell

Create mp3 playlist with PowerShell

Playlist are a dandy way of organizing the files into one list (easy to find on your device). The m3u playlist format is a no-hassle straight forward format, that’s why I love it. It is basically a list of relative file paths. Well… if it is that simple, it should be easy to write into a PowerShell statement.

PowerShell

Comparing files with PowerShell

Sometimes you want to test if two files are the same. You could run MD5 or SHA hashes of the files, but it might take some time to compute them. A byte by byte comparison might be the faster instead. I’ve wrote a script doing it in PowerShell.

.NET

Seek Position of a String in a File or FileStream

Yesterday I was working on a little bit of code to sniff out some XMP without having to worry about reading a file at a certain pre-defined position. XMP, being just plain XML, can be found by matching a string. After some googling I’ve found out that…

PowerShell

Regex Replacement Problem PowerShell: $1?

Madre mia! I’ve been trying to edit an HTML file using PowerShell. I only wanted to eliminate all the spans and paragraphs using regular expressions (would make sense)… and how hard can that be?
Well, it turned out to be pretty hard if you’re used to the replacement syntax of regular .Net expressions! After searching for hours I’ve discovered that $1 can’t be used in the same way as in .Net. Just use ${1}. Ouch!

JavaScript

How to use Regex Groups in Javascript

As a .Net developer I’m almost addicted to regular expressions to solve common string problems. The advantage of regex is that a lot of tools and languages use them. A drawback is that regex can be very complex and hard to read (documenting them is…

WordPress Theme built by Shufflehound. ©2010-2019 by Kees C. Bakker, all code is licensed under MIT.