Reset the identity key for a column in SQL Server

Sometimes you need to reset an identity column value back to 0 (after inserting test-data and deleting the rows again for example). Of course, generally you shouldn’t change primary keys and of course primary key values doesn’t matter at all, but for the case you want to start with an new idenity 1 for the first row then simply use:


CSS: display an URL after each hyperlink

This is an awesome and comfortable way to automatically display the URL from the href-attribute after each link just with CSS:

a:after { content: attr(href);}

When using this CSS rule, your links will be displayed something like this:

This is your Linktext

Have fun and use this basic css technique for example in print stylesheets or, in an extended way even on your site.

getting the number of files in a certain directory (linux or os x)

This is a quick way to get the number of files in a certain directory.
The following command even counts files potentially existing in subfolders and works as well in Linux as in Mac OS X.

find /home/some/folder -type f | wc -l

Hint: If you’re looking for the number of directories in a certain path of course you can use the option -type -d in your command

use cfhttp in cfscript version

With the cfhttp Tag (Definition: „Generates an HTTP request and handles the response from the server“) you can easily get content from other URIs.
Here’s a short example how to use cfhttp inside in CFScript, that worked for me very well.
Please note that this example works properly with getting content from username / password protected URIs, too. I’ve tested my Code with Railo 3.3.1 final

//get cfhttp result
string function getCfHttpResult(required string targetUri="") output="false" access="private" hint="returns http result for a given uri" {
try {
http = new http();
ret = http.send().getPrefix().FileContent;
catch (any e) {
ret = 0;

CSS3 substring matching

This sounds really interesting: there’s are some new attribute selectors in CSS3 which give you the power to select attributes for the patterns „begins with“, „ends with“ and „contains“.  For example you could use this technique to easily style a link list (internal links, mailto-links, external links…) with different icons.
I do not know something about the performance of these selectors but i assume you should be careful while using them. However, the Browser-Support is surprisingly good.

[att^=val] – „begins with“ attribute selector
[att$=val] – „ends with“ attribute selector
[att*=val] – „contains“ attribute selector

I recommend reading the whole article written by which you can find here:

How to convert a coldfusion query to an array

There’s a quick way to convert a query column to an array. Of course there a more, but a nice one is to do that with the functions ValueList() and ListToArray().

Let’s assume your query is named “superQuery”, and a column is named “superColumn”. You’re able to turn that into an array with:

<cfset mybrandnewArray = ListToArray(ValueList(superQuery.superColumn)) />

my personal favourite tracks discovered during year 2011

These are my personal favourite tracks discovered during year 2011. Have fun listening and tell me in the comments whether i’ve forgotten anyone, if you like!

Beirut / Santa Fe
[soundcloud url=“″]

Alexander / Truth
[soundcloud url=“″]

The Rapture / How deep is your love
[soundcloud url=“″]

M83 / MIdnight City
[soundcloud url=“″]

Cassette Culture / We once had an empire (Jungle Fiction Remix)
[soundcloud url=“″]

Beastie Boys feat. Santigold – Don’t Play No Game That I Can’t Win
[soundcloud url=“″]

Aeroplane – Without Lies
[soundcloud url=“″]

Feist – How Come You Never Go There
[soundcloud url=“″]

James Blake – Limit To Your Love
[soundcloud url=“″]

Eliza Doolittle – Money Box (Jamie XX Remix)
[soundcloud url=“″]

Eleanor Friedberger – Inn Of The Seventh Ray

Lana Del Ray – Video Games
[soundcloud url=“″]

Noah And The Whale – L.I.F.E.G.O.E.S.O.N.
[soundcloud url=“″]