Web Application Developer

  1. t4d.jyggen.com
  2. Musiclist
  3. pback.se » start_1263139525927
  4. www.serieous.se

Minify – compress your files on the fly!

Are you, like me, one of those who keeps JavaScript and CSS in multiple files for better structure and who don’t compress the code because you want to have the readability intact in your development environment? Well, then this script is for you!

I give you Minify, a script which combines and compress your files on the fly. This way the files get smaller and the client only have to make one request to the server. Just include the class in the top of the page, somewhere before you include your CSS/JavaScript, give it a few parameters and it will do everything for you. Now you can have how many files you want and edit whenever you want as long as you include the CSS/JavaScript file generated by Minify. Read more »

Store your passwords in a secure way!

Update (2010-05-29): Did some major changes to the function, latest version can be found here.

I was writing a basic register-/login-script yesterday and when I did the part where it hashes the password with a salt I realized that there should be a more secure way to store passwords, so I wrote this function.

function salt($password, $username, $salt = 'b_Il-w63') {   

    /* Split the username and the password into two parts with "(string/2)+1" chars in each */
    $user = str_split($username, (strlen($username)/2)+1);
    $pass = str_split($password, (strlen($password)/2)+1);

    /* get the first character in the username and the password and convert them to its ascii value */
    $user_ord = ord($username[0]);
    $pass_ord = ord($password[0]);

    /* merge all variables into a special pattern */
    $string = sprintf('46%s-3S%s-%u-%s-%u-1a%s-F4%s', $user[0], $pass[0], $user_ord, $salt, $pass_ord, $user[1], $pass[1]);

    /* hash the string with sha512, and then it again with md5 */
    $hash = hash('sha512', $string);
    $return = hash('md5', $hash);

    /* reverse the md5 hash and return it */
    return strrev($return);

}

This way, even if someone can produce a rainbow table for the algorithm, and has the salt to do it with, they will never know where in the hash parameter the salts was placed, because they don’t know the length and first letter of the actual password. And of course we’ll salt it with a string (third parameter) which is hidden deep in a configuration file somewhere, which requires the skiddie to actually access your files to get it.

When the string is ready we hash it with sha512 and then again with md5 (less byte to store in the database) and after that the function returns the hash. One thing’s for sure, I’ll use this for all my projects :) .

Tour 4 Dead

t4d.jyggen.com

Tour 4 Dead is a tournament site/system for Valve Software’s two games Left 4 Dead and Left 4 Dead 2. As a logged in user you can create tournaments, create teams with other users and participate in tournaments with that team. There is also a few community features on the site such as forums, profiles etc.

This site is not finished yet, but will be in the upcoming weeks. The plan is to test the system a few months and then, if the site gets popular, expand to more games such as Modern Warfare 2 and Counter-Strike. Design is once again done by Fredrik Larsson.

Musiclist

Musiclist

A site made for Young Entertainment Stockholm. Design by Fredrik Larsson.

Musiclist ägs och drivs av Young Entertainment Stockholm Handelsbolag. Företaget har sitt säte och kontor i Stockholm. Webbplatsen lanserades i januari 2009 för allmänheten, i syfte att uppmärksamma artister och deras musik. Musiclist.se tillhandahåller ingen form eller typ av musik, utan använder sig utav utomstående databaser och webbplatser på internet. Young Entertainment Stockholm innehar även rättigheterna till www.musiclist.nu samt www.musiclist.dk

Playback Spelförening v2.0

pback.se » start_1263139525927

Playback is a non-profit association that I was the chairman of for almost three years. The main purpose for this association is to host LAN Parties and other gaming related things. Since most of the members are old friends from the ninth grade, it’s also a nice way to stay in touch with each other after the “split up”.

This is one of my first released php sites so I feel some kind of proudness over it, even though it’s kind of messy and un-optimized. Design, xhtml and CSS made by Fredrik Larsson, who is the secretary chairman in the association.

serieous.se

www.serieous.se

serieous.se was a school project created in early 2009 by me and Fredrik Larsson; he made the design and I coded it. The site is almost complete but is put on hold for the moment because we’re both busy with other stuff.

serieous.se is mainly a Swedish news site which post news and rumors about (mostly) American TV-shows e.g. Lost, Heroes, Family Guy. Around this news site we’ve build up a community with profiles, guest books, forums etc. There’s also an archive with downloadable files, an information page about every show and much more!

Twitter

  • Just picked up my #SC2 copy at my dads - time to get pwned by the koreans! 3 days ago
  • MVC for Noobs - http://bit.ly/9RJXg8 4 days ago
  • at work. I want to stay here during the weekend too since there's no internet at my place until sometime next week :( 2 weeks ago
  • Just won a betakey to SC2 on levelcap.se, awesome! :D 3 weeks ago
  • Monkey Island 2 Special Edition: LeChuck’s Revenge is released in 4h. The summer is saved! :D 3 weeks ago