Hjertnes.blog

Popsocket

May 19, 2019

Popsockets are this thing you glue to the back of your phome that you can pull out or collapse so that you have something to hold onto that does’t bulge out a lot when you pocket your phone.

They look kind of weird, but I am really enojoying using them. They have multiple versions, I’m using the kind you can twist off so wireless charging still works.

What a popsocket gives you is a easier way to hold modern larger smartphones, you can kind of just let the popsocket rest between your fingers and you don’t have to grip it. I have noticted that I’m enojoying hold my phone way more, I have less pain in my wirst when I use my phone a lot and I’ almost never tired in my hand because of it.

They are not expensive, and I’d give it a shot. I didn’t think I would like it before ordering some, but now I can’t imagine having a phone without.

Notes on the ox-hugo workflow

May 17, 2019

I love having static sites, because they don’t require a lot of work to keep running. But I still have a full featured one at Micro.blog to make posting images and from my phone easy. One of the things that often keeps me from posting is the hassle of creating a file following the proper naming schema etc.

If you like me like Emacs and Org-mode and have a static site, I recommend taking a look at ox-hugo. It is just a emacs package you can use to generate markdown front matter files from a org file. Front matter is the key-value stuff at the top of your blog posts that most static sites use. I think it started with Jekyll, but I might be wrong.

Ox-hugo is made for Hugo, but it should work with anyhting by adding some custom fields. I use it with my custom Gatsby setup on all my three sites

Likes

May 17, 2019

I’m thinking about doing some basic categories for these links, I might start doing it next week, but first I got to make up my mind about how I’m going to do it.

Pull request based workflows

May 12, 2019

There are two major ways to work with git that I am aware of, you either work directly on a branch, that means that everyone commits to the main branch (usually master) and then pushes changes directly to it. Or you work on “feature” branches, create a pull request for it, and someone reviews it and then you merge that into master.

I think Pull Requests are useful even for very small teams because it is a very simple way to do code reviews. That makes it easy to point out dumb mistakes we all make, give good tips or point out things we didn’t think about. Or to give your team mates grief for not writing tests.

Personally am I also a huge fan of deploying a PR, then merge it into master, so that the pull request are deployed all the way to production. It is the best way I know of to keep enviornments stable.

Some CMS changes

May 11, 2019

I’ve been working a little bit on changing how I manage my sites recently. The Inksmudge is still on Hexo but I’ll move it over to Gatsby soon. And I have created a wiki using the same setup.

I have configured Gatsby to work with a folder structure of front matter markdown files like Hexo, Hugo or Jekyll does. And it just generates a folder of HTML. I host and build it with Netlify. But I write it all using org-mode, through ox-hugo. I just have a few org files that I geneerate markdown files from.

I’m really happy with this setup because it makes it just a little bit easier because I don’t have to create a lot of files etc. Probably not something most people want. But it works great for me. One thing to note though, I do keep blog posts in multiple files for this site, because a single org file doesn’t scale beyond a few hundred. Than it all becomes kind of slow, and it takes a long time to generate

Likes

May 11, 2019

Yoga

May 09, 2019

One of my goals for 2019 is to loose some weight and get into shape. The main thing though is to get something started that will make sure I’ll be healthy in the long run. In other words: I do not care that much how much I loose this month, next month or this year even. But rather that it is more of a lifestyle change.

I have been into different kinds of excerise in the past, running, going to a gym, rowing machines, swimming but none of it really worked for me. I’m not sure why. So I decided to see if I could find something different this time. What I landed on was Yoga, because it didn’t require any equiptment or a proper gym. The latter is important because I do not have a huge amount of time for this, and the less time I have to spend getting from and to excerise the better it is. Also: if I can do it inside it is a huge bonus, because then I can’t use the shitty weather as an excuse.

This is something I started in the end of January, and I’m still doing it. What I really enjoy about doing yoga is that it doesn’t feel like I’m really working out, something that is great when you don’t really enjoy most kinds of excerise, and you notice the difference in both strenght and flexibility more or less straight away. I have way less problems with stiff muscles and pain in my back, shoulders etc after I started doing this.

The way I got started was that I searched for Yoga in the app store downloaded the first 30 apps or so. Deleted all the worst ones and continued doing that until I had a small handful of usable ones. None of them are great, but some are usable. The first few weeks I used one called Daily Yoga. It is pretty good, you have you video based guided yoga. It was really helpful in the beginning. But then I felt like I wanted something different, more like “I want to do yoga for 15 minutes tell me what to do”. The only good app I found for doing that is called Pocket Yoga. It is pretty awesome. There are five different options and some options to configuring how long etc. It is great if you want something guided. They also have an companion app for desgining your own sequences.

My feeling is that Yoga is very much about finding what works for you. What I do these days is that I just track it with my Apple Watch and do it unguided. And I use an app called Yoga Studio to look at poses, and I try to remember at least one new one each week.

I also bought some books, they have give me a lot more than any of the apps have. This one is my favourite: Namaslay: Rock Your Yoga Practice. It is fun and awesome.

There are a lot of yoga gear available. I didn’t use any when I started out, and I didn’t really have any until very recently. It is helpful but not neccessary. I bought a starter pack of a mat, two blocks and a strap. It helps, but it is in no may neccessary to buy any before you know if you like it.

Why rolling your own emacs?

May 05, 2019

This might not be for you, but if you’re into being able to configure and make your own text editing environment it might be for you.

Then you have the option of using a starter pack like Doom or building your own. I used to love Spacemacs and Doom until I started to become frustrated by the complexity under the simple configuration system, and the limits of it.

The result was a six month period where I experimented with all kinds of starter packs, my own configuration multiple times before I finally learned enough and found a setup that worked for me.

I do recommend doing your own config and I do recommend learning the default keybindings. But when you do start with no packages except use-package and add stuff as you see a need. And learn to add them using use-package from day one.

On no packages, the fewer packages you add the faster and more stable emacs will be. And emacs makes a lot more sense if you use the default keybindings.

My configuration are used on windows, Mac and Linux. This makes it more complex but only very few configuration items are affected by this. But it makes it more complex.

The way I deal with my configuration is that I have a very low bar for adding new stuff to my configuration, but I also regularly remove everything that doesn’t add real value.

Emacs is a lot less fancy than something like vscode, but also a lot more powerful.

My pile of Instapaper automation hacks

May 03, 2019

I try to automate stuff in my life to remove friction. One of these areas are sharing cool or interesting links I’ve read. The way I do this is that I mark them with a heart in Instapaper, then I copy the links out and post it before I remove the heart and start over. This would be a really simple task to automate through their API, if they’d bother to answer my request for an token.

The result is that I wrote this script. It is on NPM and you can run it with something like npx @hjertnes/likes ./pathToFile.csv. The way it works is that you download a CSV export from Instapaper, point the script at the file and it puts the links as a list of markdown links on your pasteboard. Then I paste it into a markdown file and publish it.

Then I paste this Object.values($(".action_link.star_toggle.starred")).map(x => $.get(x.href).then(y => {})) piece of Javascript in the console in the browser with the Likes section of the Instapaper website open, then I refresh and repeat until it’s empty.

That’s it. All of it would be a hell of a lot faster, cleaner if I got access to a proper API.

Likes

May 03, 2019