RSSAmplifier

Blog

heyman.info

heyman.infoRSS feed ↗29 posts

Latest posts

Launching Wheretostay.in

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 , Vilnius , New York , or any of the other 180+…

Heynote: A dedicated scratchpad for developers

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 overwhelmingly positive. For some reason, I never got…

Visual Studio Code without the title bar

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 ++ with these settings: "apc.electron" : {…

Stop saying that you should never use fill-justified text on the web

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 A study from 2017 showed that sloppily fill-justified text - without hyphens to break words across lines - reads slower than left-aligned text with a ragged right . However, the same…

Avoid the Apple App Store

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, but I found myself wanting to play more than once a…

Roni - A competitive word game

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 letter tiles on a 9x9 board. In each round, both…

Docker Image for Periodic Postgres Backups

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 versions ( 13 , 12 , 11 and 10 ). Here s an example…

Releasing Whatismyaddress.net

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 postal codes and mobile positioning isn t always 100%…

How to get lowercase month names in Pelican URLs/paths

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 = '{date:%Y}/{date:%b}/{date: %d }/ {slug} /index.html' Pelican constructs the URLs…

A small Pelican plugin for compiling a Netlify _redirects file

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 ( netlify_redirect.py ): import os from pelican import…

Releasing Bed & Breakfast websites

This week, I released a couple of new websites for finding nice Bed & Breakfasts . We currently cover 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 blog .

Show number of requests made by different IPs, by analysing nginx log

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 many of the last rows to look at, and can of course…

Get personalised event recommendations using Heyevent.com

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 should be the ultimate event guide for Germany.…

Hejevent.se - New website for finding events (in Swedish)

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 on top of Facebook data comes from the ability to…

Speed read things with Heyread.it

TLDR : Speed read this Last month, I was at Hackaway #1 - an amazing Hackathon at a secret location, which ended up being a lovely island in the Stockholm archipelago. At this hackathon, I built Heyread.it - a tool for speed reading. It works by displaying the words serially, one word at a time, at the same position. When reading a text normally, for every word, there s a short moment when …

My year in review 2013

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 displaying the ZIP /postal code of your current location.…

Releasing BoutiqueHotel.me

Last week, I released a 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 PostGIS as database, memcached for caching and Redis as Celery s…

My flask entry point file that uses docopt

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 server. Here s the entry point file I use for What is my…

Share your current location using Longitude.me

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 else, and you need to know their location (or want to…

Releasing Whatismyzip.com

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 is called What is my zip? (use a smartphone or…

Heroku: Running multiple python processes in a single dyno using foreman

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 one web dyno and one worker dyno (celery in this…

Extending templates from a specific Django app

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 index.html from the templates directory in the admin app, to…

Google Chrome bug when setting document.title after tab switching

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 handler), the title change will not be visible in the…

jQuery Title Alert

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 has another window, or another browser tab, in focus.…

URL Shorteners Suck

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 to work indefinitely. I don t want random companies…

Python urllib2 timeout issue

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). Anyway, the other day I found - if not a bug - then at…

Hack your motivation with statistics

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 rental station at the address (by looking at the…

Favorite Django Tips

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 , you just return a python dict which will be used…

MMS Decoder 0.82, and website back online

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, but hopefully when I do, they will be interesting.…