Category: Code

  • Nya visualart.com – allt från läder och strategi till LED och guld

    Nya visualart.com – allt från läder och strategi till LED och guld

    Earth People har en långvarig relation med Visual Art och har varit en betrodd samarbetspartner under mer än ett decennium. Tidigare samarbeten har resulterat både i webbplats och medskapandet av Visual Arts produkter och interna verktyg. De senaste åren har Visual Art växt så det knakar, både i storlek och vad gäller mängden tjänster de…

  • Lessons from making the server side to Red Bull Secret Gig X Robyn

    Lessons from making the server side to Red Bull Secret Gig X Robyn

    So we made a game for Robyn and Red Bull. This is the first in a series of posts about this. Here we focus on the server side and outline some of the challenges we had. Post nr 1: This post. Post nr 2: The making of… Post nr 3: The design of… While the…

  • Skriv bättre commit-meddelanden med hjälp av Gittan

    Skriv bättre commit-meddelanden med hjälp av Gittan

    Jo, men för ett år sedan skrev vi överlag rätt dåliga commit-meddelanden. “Fix” och “Stuff” var inte helt ovanligt att läsa i historiken. Problemet med sådana meddelanden är att de inte ger nånting; att komma in som ny utvecklare i ett projekt fullt av “Fix” är minst sagt lite knepigt. För att få alla att…

  • 📸 PushSnapper visualiserar utvecklingen av våra webbplatser

    📸 PushSnapper visualiserar utvecklingen av våra webbplatser

    Vid utveckling av webbplatser gillar vi att få en visuell historik över sajtens utveckling. Allt från en första vit blank sida till en färdig sajt med logotyp, menu, content och (ibland) andra färger än vitt. För att få denna historik har vi utvecklat ett eget verktyg vid namn 📸 PushSnapper. En skärmdump vid varje deploy…

  • The Future of Grids

    Our friend Emil Björklund has just published his third tidbit about CSS Grids. The future of web layout looks bright. Don’t miss part 1 and part 2.

  • Mandatory reading for PHP devs

    I just wanted to give this site I stumbled upon some credit: http://www.hackingwithphp.com/. I’ve been developing with PHP for about 15 years, but still the part about performance taught me quite a lot. isset() is apparently faster than array_key_exists() and $i++is slow compared to ++$i. These are micro-optimizations, sure, but there’s no reason to rub PHP the wrong way… /Peder

  • Finding out sentiment

    Say you want to find out if a user generated text is happy, sad, upbeat or hateful. Not so easy is it? We were given this task as a part of a recent project. And to make things even more challenging we needed to do this in both Swedish and English. After a bit of research…

  • An API for Faking Swedish user details

    Lorem Ipsum is great for generating place holder texts, and Placehold.it (and our own Place-A-Pet!) does the same job for images. Sometimes though, you need to create fake Swedish users. Say you want to generate dummy comments or fake forum users. What to do? I just created a little webservice for this. Get a HTML-table by going…

  • Making headless screengrabs without PhantomJS

    Ok this can be done with PhantomJS and it is probably better/simpler/etc. But if you, for any reason, can’t use PhantomJS to make screengrabs, here’s an over complicated alternative we came up with. wkhtmltopdf is an easy way of making screengrabs of webpage: $ wkhtmltopdf “http://google.com” googlescreendump.pdf Most package managers (at least Rpm and Aptitude) has it,…

  • Creating a mobile event experience using social connections

    Creating a mobile event experience using social connections

    Red Bull asked us to come up with something mobile and social for their Red Bull Weekender event in Stockholm. We love music, and planned on going to this event anyway, so figuring out the functionality was very fun and actually pretty easy. For non FB-connected users we pretty much show a lineup, in which…

  • Working around the IE9/IE8 XDR Post bug

    When creating a REST-API for a client we ran across this really weird problem. IE8/IE9 can’t make XMLHttpRequest to other domains via CORS. Microsoft invented their own solution for this problem, called XDR. The problem with XDR is that it doesn’t send a Content-type when doing POST requests, defaulting this value to “text/plain” instead. PHP…

  • Preventing overlapping cron jobs

    From time to time, we’re asked to fix broken sites built by other agencies. This can be extremely tricky, but if it’s technologies we know and love (PHP, MySQL, Apache, Memcached, WordPress, CodeIgniter, Laravel, Slim, etc) we usually say yes. If a site keeps falling every n hours/days, I start by checking if there are any…