Blog posts


  • Photoshop: Copy to new color problem

    December 09, 2010 | Tags: Photoshop, Troubleshooting
    A rather bizarre problem occured today. After recieving a layered PSD-file from an Art Director and trying to copy a single coloured layer into a new image I ended up with a layer with a different color but not only that. It seemed to be dithered as well! Looking into settings, nothing appeared wrong. After some trouble shooting I finally found it: The color profile embeded with the PSD-file was missing or didn't match the once I've installed, but Photoshop didn't say a word about it.

    This is how to fix it:
    1) Goto the menu and Edit / Color Settings...
    2) Check all boxes for Profile Mismatches and Missing Profiles
    3) Done!

    Now you can copy and paste as new AND get a warning when the profile mismatch instead of just getting the layer with all the colors wrong.

  • Randomize a list of strings in .net

    December 09, 2010 | Tags: C#, Snippet
    Need to randomize your list or array? Well, here's a snippet for you that will return the list with the items in a random order. It can easily be changed to sort other types of lists (or arrays) as well.
    private static Random rng = new Random();

    public static List<string> Randomize(List<string> list) {
    byte[] order = new byte[list.Count];
    rng.NextBytes(order);
    string[] tmp = list.ToArray();

    Array.Sort(order, tmp);

    return tmp.ToList<string>();
    }

  • Copy text to clipboard AS3 / Flash

    November 29, 2010 | Tags: AS3, Flash, Snippet
    Here's a usefull little snippet which allows copies a text into the global clipboard from Flash/AS3:
    System.setClipboard("This will be placed in the clipboard");

  • Great web hosting 50% off today!

    November 26, 2010 | Tags: Off-topic, Web hosting, ASP.NET
    Arvixe is a great web host, especially when it comes to features and price for their Windows / ASP.NET platform, which not many other hosting companies can offer at the same price.

    For today only they offer 50% off life-time for new hosting accounts. So if you're looking for a great host for your ASP.NET (or UNIX/PHP/WordPress or whatever you're into) then you should definitley check them out.

    My own experience has so far been great. I've contacted their "live chat" support one time, and they solved my rather technical problem instantly. Something I've not experienced with two many other budget web hosts I've come in contact with.

  • CSS3 boxshadow with opacity snippet

    November 10, 2010 | Tags: CSS, Snippet
    Here's how to create a style with boxshadow for different browsers (-webkit = Safari, -moz = Firefox etc). It also shows how to use opacity using the rgba-constructor:
    rgba(red, green, blue, opacity ranging from 0.0 to 1.0)

    The boxshadow attributes are:
    distance x, distance y, blur, shadow color

    <style type="text/css">
    .shadow {
    box-shadow:5px 5px 20px rgba(0, 0, 0, 0.75);
    -webkit-box-shadow:5px 5px 20px rgba(0, 0, 0, 0.75);
    -moz-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.75);
    }
    </style>
    This is a sample of the shadow above