hjertnes.blog

#

23.03.2018 01:00

Men last night while browsing pencils.com: what the fuck is the deal with shoes?

#

23.03.2018 01:00

Back to 1Password

#

23.03.2018 01:00

Bookmark: GitHub - hjertnes/just_another_cms

My office setup

23.03.2018 01:00

I try to keep my office setup as limited as possible. Because I don’t want too much stuff that might keep me from feeling productive when I don’t have them available.

My office at home and office at work have a few things in common.

  • Apple Magic Keyboard

  • Apple Magic Keyboard

  • LG 27” 4K USB-C screen

  • One USB-C charger

  • One Lightning charger cable, connected to a outlet

  • One Micro USB cable, connected to a outlet

  • One Apple Watch cable, connected to a outlet

And that’s it. I just connect my MacBook Pro to the USB-C cable to charge and connect the screen. And I have all the charger cables I need.

#

22.03.2018 01:00

When I started to use Hugo, I told myself that I had to implement some kind of way to use existing apps in order to make it enjoyable. I really enjoy the Micro.blog apps and I really enjoy MarsEdit. The result is micropub and oldpub. Both of them are written in Python and Flask; they are also ready to be used in a public facing server.

The micropub server is really simple. It supports a few different contexts and uses IndieAuth for authentication. The way it works is that when you upload a image it uploads it to the appropriate location on your file system, and the micropub endpoint takes the data and turns it into a text file that Hugo uses to generate your website. I went with Python and Flask for this because it is very minimal and easy to use.

Oldpub is a implementation of the Wordpress XML-RPC API. I have only implemented the parts of it that I care about. How I ended up with Flask here is a result of a lot of Googling. There are some Ruby implementations of the MediaWeblog API, but none of them are complete enough to work in a production system. And I found a some example code for a implantation using Flask and Python. That code was the starting point. The big difference between this implementation and a typical database driven one is that it has to read files and folder structures instead of da SQL database. This means that the code is a little bit more complicated and slower. But thats fine, since the only purpose of these API’s are to publish to a blog.

The next step how I host and update my sites. All of my stuff are hosted on a Linode server, using docker. I’m not going to get too deep into the configuration of it, but NGINX hosts the static files for my Hugo sites, and runs in front of all my server software. And the way I update my Hugo sites is that all the content are in GitHub repositories, and I have a script that pulls changes, adds changes and pushes them up to GitHub before I rebuild the site. It is just a simple shell script that runs in cron every X minutes.

I’m not going to continue to use them myself however, because I’m working on my own CMS. But the current implementation works perfectly fine and I have used it for over a month.

#

22.03.2018 01:00

Faster load time or a full JSON / RSS feed?

#

22.03.2018 01:00

I’ll take iOS seriously when it includes terminal.app and Homebrew

#

22.03.2018 01:00

@hjertnes test

#

22.03.2018 01:00

Yawn

#

22.03.2018 01:00

When you change your profile picture and don’t recognize your own posts