Du är besökare 20175

  • 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…

  • More node.js game action

    More node.js game action

    This small game idea felt like fun – there is a man walking at the bottom of your browser window. Adjust the size of the browser window to make the man walk into the green area, i.e. live on. Try the game here: http://nodelab.earthpeople.se:1112 The man walks faster and faster and more green doors appear. To…

  • Quiz buttons in node.js

    Quiz buttons in node.js

    For our recent fall party we made a music quiz, and if you’re quizzin you gotta have some buttonpressin. We looked for quiz buttons at teknikmagasinet, surprisingly we didn’t find anything. So www what do you have to offer? Nothing? Well ok, let’s build some buttons in node.js. Real time web! 5 teams, connected to…

  • Web audio music game

    Web audio music game

    After we did the rhythm experiment at Music Hackday we fooled around a bit more with the web audio synthesizer. It’s pretty amazing that they got a built in synth in Chrome, and if you got some knowledge of synthesizers the different audio experiments out there (googles own minimoog for example) actually seems pretty straight forward,…

  • Scaling isn’t tweaking httpd.conf – our approach to high volume sites

    Scaling servers is hard work, and neither of us comes from a devops background. Our approach to scaling starts well before that – with every decision a developer take when structuring the app. For a campaign site we made recently, we expected huge amounts of traffic. The site itself was one of those one-page things,…

  • using social media as a cms

    We recently launched andtherev.com, a new kind of bike shop/factory on Södermalm in Stockholm. The client wanted website users to be able to participate on the site, so instead of using a CMS to fill the grid with content we used Twitter and Instagram. Each page on the site contains a mix from Instagram and Twitter. The…

  • beer hacking

    beer hacking

    today it’s ready: our own brew that puts “real” microbreweries to shame. this is a mere 12 bottles of what we hope is a fairly hoppy american pale ale. making it was easy. 2 pots and 2 hours. and a kit from köksbryggeriet.

  • Pantaluren.se (in swedish)

    Vi lanserade just ett eget projekt. Earth People är delaktiga i detta, inte bara som byggare utan även som partners. Tjänsten är inte färdig eller perfekt, men vi gillar att släppa saker tidigt och iterera ofta, så ha det i åtanke. Hittar du nån bugg, säg hemskt gärna till. Tjänsten heter Pantaluren, och är i…

  • WordPress loops: with_posts() is my way of dealing with them

    One of the most boring, cumbersome and dangerous things with WordPress is getting and working with posts in custom loops. A common situation is like this: That’s a bit cumbersome I think. Do I really need to do that while-thingie, that the_post()-method-thingie and that wp_reset_postdata()-thingie each time? It feels a bit… repetitive. And dangerous, since…

  • How we created an API to our coffee machine and how we abused the 418 I’m a teapot

    We needed(?) a REST API to our coffee machine. So I put a Twine next to it, and made it call back over HTTP to a webhook on one of our servers. This webhook logs all the temperature changes, and now anyone can query the dataset via our REST API. It just returns if the coffee…

  • Our #musichackday hack – Stealing Feeling!

    Our #musichackday hack – Stealing Feeling!

    UPDATE: We actually won an iPad Mini courtesy of Echonest for the hack! Very encouraging! Me, Fredrik and Adrian attended the Music Hackday in Stockholm, and made a little something. In short: 1. Steal the feeling from someone who’s got more of it than you. 2. Apply it to your music. It’s based around a 16…