I’ve launched a new website called Where to Stay. It provides neighbourhood guides for large cities and other travel destinations worldwide. I’ve wanted this service to exist for many, many years — and now it does! To see it in action, you can check out the guides on Where to stay in Stockholm, Tokyo, Athens, Barcelona, Tbilisi, Berlin,...
Last year, I spent a significant portion of my spare time developing Heynote — a scratch pad app specifically designed for developers. I announced Heynote on Hacker News just before Christmas. It was built primarily for my own use-case, but it seems to have struck a nerve because it got 1000+ upvotes, and in general, the feedback has been...
I’ve been using VSCode with the Customize UI extension to hide the title bar and save screen space. However, a Microsoft update a year ago broke this extension, leading me to stay on an older VSCode version without updates. Recently, I found a solution that allows me to update VSCode while keeping a clean UI. I switched to Apc Customize UI++ ...
Many articles around the web say that you should never use the CSS property text-align: justify. The main criticism is that so-called whitespace rivers reduces readability. Toggle text justification for this post #text-justification-toggle { border: none; background: #3581ac; color: #fff; font-weight:...
Have you ever though about building an iOS app? I did, but I now wish that I hadn’t. Like many others, I read about Wordle at the end of December last year. Being a word game enthusiast, I found the idea of making the old game show Lingo into a single-player puzzle game brilliant. I enjoyed solving the daily word for a couple of days straight,...
At the end of last year, my friend Robert and I released a mobile/tablet game called Roni. I’ve been meaning to write a blog post about it but haven’t gotten around to it until now. In a Roni match, players compete in three rounds where the goal is to score as many points as possible, within the three-minute time limit, by forming words using...
For the last couple of years, I’ve been using a small Docker image called postgresql-backup for taking periodic PostgreSQL backups (using pg_dump) and uploading them to S3. It was originally a couple of quick and dirty scripts that I put together, but today I’ve taken the time to improve it. Postgresql-backup has tags for all recent PostgreSQL...
I’ve made a new website called What is my Address? It basically does what it says; tells you the current address based on your GPS position. I already have a similar website What is my ZIP? that can be used to find the current postal code for you current position. So this site is fairly similar, but since there are many more addresses than...
When I rewrote this website using Pelican, I wanted to use three letter month names (i.e. jan, feb, mar) in the URLs. In Pelican you can customize the URL of an article by setting the ARTICLE_URL and ARTICLE_SAVE_AS variables, like this: ARTICLE_URL = '/{date:%Y}/{date:%b}/{date:%d}/{slug}' ARTICLE_SAVE_AS =...
I recently re-wrote this website using Pelican, and I host it on Netlify. In the rewriting process I wanted to make sure that I could keep a few URL redirects that I had set up in my old Django app. Therefore I wrote a very simple Pelican plugin that will generate a Netlify _redirects file in the output directory. Here’s the whole plugin...
Unfortunately I don’t blog every time I release a new website or open source project, even though I should. I’m going to try to be better at that, and also I thought I’d do a late new year’s recap of (computer related) things I did in 2013. Websites What is my ZIP In the beginning of last year I released What is my ZIP? - a small hack for...
Recently I’ve made a few small python web projects that I’ve deployed on Heroku. For some of these projects I’ve needed to run asynchronous jobs through Celery. Heroku allows you to run one free dyno (or actually they give you 720 free dyno hours per month, which corresponds to one dyno constantly running). This means that if you choose to run...
This week, me and Ted Valentin released a couple of new websites for finding nice Bed & Breakfasts. We currently have websites that covers B&Bs in cities like Amsterdam, Cape town, Dublin, Gotland, New York, Brighton, London, and Paris. We’re planning to release more places in the future. Ted has written more about the sites, in swedish, on his...
Here’s a small command that uses awk, sort and uniq to see the number of requests made to an nginx server, aggregated by IP, and sorted by the number of requests made. tail -n 300000 /var/log/nginx/access.log | awk '{print $1}' \ | sort | uniq -c | sort -n Can be useful to see who is crawling your website. The tail’s -n parameter specifies how...
About a week ago, I released a new website called Hejevent.se. It’s a website that helps you discover events. Hejevent builds on top of Facebook events, which is nice since so many public events already exist on Facebook, it means that I already have the most comprehensive guide to events in Sweden. However, the real power from basing the site...
Recently I released Hejevent.se, a swedish website for finding local events, which I also blogged about. Today, I’m very happy to announce that I’m releasing two new websites. First, Heyevent.com which is now available for anyone in the whole world who wants to get recommendations on interesting local events. I’m also releasing Heyevent.de, which...
TLDR: Speed read this(function() {var s=document.createElement("script");s.type="text/javascript";s.src="//heyread.it/button";s.async=true;var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(s,o);})(); Last month, I was at Hackaway #1 - an amazing Hackathon at a secret location, which ended up being a lovely island in the...
Last week, me and Ted Valentin released our new website, BoutiqueHotel.me. Boutique hotels are, for those who don’t know, (usually quite small) hotels with thought-through concepts and unique attributes. You can for example check out boutique hotels in Stockholm or in Cape Town. The site’s tech stack is Python + Django & Celery, PostgreSQL with...
During the holiday I finally got to finish the re-make of my website, and I’m very happy to announce that it is now up and running on Python/Django. The biggest change here is that I’ve added a blog where I will write programming/web development/python/django/javascript/tech stuff. How ever, I predict that I will not write blog posts very often,...
A little more than a year ago I wrote a small jQuery plugin at ESN where I work, called jquery-titlealert. It provides functionality for flashing a notification message in the browser title. Title alert notifications can be useful when you want to notify a user of some kind of web page event (for example an incoming chat message), when the user...
I’ve been using Docopt - a neat library that lets you define command line arguments in a good looking, human readable docstring - in the entry point file of some of my Flask projects lately, and I thought I should share it. It’s nothing super fancy, but useful in development as it allows me to optionally specify the interface and port of the...
Today I’m releasing a new website, called longitude.me. With it, you can create “longitude links” which you can share with people in order to see each others current geographic position. The visitors’ positions are updated live in real-time while you’re looking at the page. So if you’re meeting up with someone downtown, in the park, or anywhere...
Every now and then, I find myself in need to know the ZIP code for the location where I’m at. Usually this is when I’m at the office, visiting my parents, or similar, and I’m about to order something. I realized that combining HTML5’s GeoLocation API with the Google Maps API, I could build a small website to solve this problem. The result of this...
A while ago (well, actually a long time ago since I had this blog post laying around as a draft, until I stumbled across a stack overflow question that this post would answer) I wanted to customize Django’s admin app, by adding a link to a statistics page that I had built, on the index.html page of the admin app. I could have copied the...
Usually it’s IE6 that makes you cry because of quirky behavior, but today I ran into a bug in Chrome. It caused notification messages to sometimes get stuck in the title bar, in my Title Alert jQuery plugin. It turns out that if you set document.title immediately after you have activated the browser tab (for example in the window.onfocus event...
For a website me and my friend Robert recently released we had to do a tedious work of manually positioning a lot of car rental stations geographically on a Google Maps widget. For every station, we had to look up the address using a swedish yellow pages service or Google it if it wasn’t found, and then manually verifying that there was a car...
A few months ago I found a really useful Stack Overflow Question. Here are my favorites from the answers. Use render_to decorator instead of render_to_response This decorator is found in the app django annoying, and is a very nice shortcut for declaring what template a view should render. Instead of returning the response of render_to_response,...
Ever since the rise of twitter, when URL shortening services got an extremely big popularity boost because twitter chose to shorten their URLs for technical reasons while ignoring user experience, the web has been polluted with shortened links. I want to be able to see where a link goes before I click it. I want to be sure that my links continue...
I use urllib2 from Python’s standard library, in quite a few projects. It’s quite nice, but the documentation isn’t very comprehensive and it always makes me feel like I’m programming Java once I want to do something more complicated than just open an URL and read the response (i.e. handling redirect responses, reading response headers, etc). ...