Tag: english

Setting up nginx reverse proxy

I once set up nginx reverse proxy before, but I was just pasting stuff from online tutorials, not really understanding what I was doing. So when earlier today I decided I’d set up nginx to serve as a reverse proxy both for Apache and for node.js and Rails projects (soon to be) running on my server, I basically had to learn it all from scratch again.

Since everything on my server is now secured with SSL, I had to combine the methods from various sources on Git, Stack Overflow and Digital Ocean. My idea of the request flow was like this:


Ubuntu DNS errors

Basically every Ubuntu upgrade I run into this issue of my network connection dropping all the time – at least it looks that way. What temporarily solves it is clicking the “Auto Ethernet” item in the Network menu, but when it happens once every few minutes, it gets pretty frustrating. Especially since plenty of JavaScript based sites don’t handle sudden errors like that properly so I often ended up clicking on the retweet button a bunch of times before I realized something was wrong and confirmed it was my connection (again) in the browser’s console.

It kept throwing errors like DNS_PROBE_FINISHED_BAD_CONFIG and various other DNS related errors (NXDOMAIN, NO_INTERNET). Searching the net gives plenty of options for possible points of failure, and fixing the NetworkManager.conf (that was overwritten during the upgrade) helped me before.


My new job

For two months now, I’ve been working as a Ruby on Rails developer in downtown Tokyo. It’s a whole different world compared to working in anime. Instead of working from 1pm to midnight (though in bicycle distance from home), I now work regular hours 10am-7pm (though with an hour commute one-way). I still go to the gym every weekday and I still can’t manage to achieve a decent sleep schedule.

Work itself is much better. Working in anime was extremely easy. There wasn’t much to do most of the time and even when there was, it wasn’t in any form challenging. Only maybe physically, when I had to drive here and there until 3am. We could come up with ideas for new projects, but the chances of any of them getting any serious attention from superiors was (is) basically zero. All that added up into a huge incentive to quit as soon as I got a chance.


The Expanse

I don’t exactly remember how I ran into The Expanse, but I ended up watching it. At this point I’m a few episodes into season 2 and I’m not exactly sure I want to see the rest.

Every review and opinion of the show mentions how the actors are horrible and the writing is great – I must have terrible taste because I am much more irritated by the story itself than by any of the actors.


Clementine DBus changes with Ubuntu 17.04

My #nowplaying poster for Clementine stopped working with the upgrade to Ubuntu 17.04 Zesty. After short debugging with D-feet it turned out that there were some changes to the way it interacts with DBus – which is, I guess, also the reason why it can be controlled properly through the Media menu now.

However, I was (am) totally ignorant re: DBus, so figuring out how this pretty complex system worked, in one hour, still slightly tipsy, past 2am, was not exactly a simple task. Though it was still faster and easier than getting vsftpd to work properly (sober and early afternoon), as there I just gave up and apt-get purged it.


#nowplaying, now with Mastodon and Clementine

Once upon a time I made a Python script that posts the music playing in Banshee (Ubuntu) on Twitter. Times have changed and now I use Clementine to listen to music, furthermore I jumped the Mastodon bandwagon too, so I wanted my script to toot too, not just tweet.


MeCab for MySQL on Ubuntu Xenial

I was looking at fulltext search options when I found out that there is a Japanese language-specific plugin to make indexing more meaningful. Japanese doesn’t have word-delimiting spaces, so fulltext usually has a very hard time with it. MeCab uses a dictionary approach to that, in contrast to n-gram which just splits up words into equal sized bits.

Let’s check my MySQL version first… Apparently I have 5.17, which supposedly comes shipped with MeCab. Except it doesn’t, if you use Ubuntu, because apparently dependency rules for the universe repo don’t let them include it. Which is a huge pain in the ass, since I now have to look for the libpluginmecab.so file myself, and finding it wasn’t exactly an easy task.

Sure I’m not very well versed in the workings of open source dev communities, so I’ve got no idea where I’m supposed to look. I figured that if they can’t include that plugin file in the repo, then they might make it available elsewhere. I found it eventually in the community package .deb for the server, so I tried naively just extracting it and putting it in my plugins folder (which is /usr/lib/mysql/plugin/ in my case).


That S

As you may have noticed, my site is now secured by Let’s Encrypt. They’re an EFF-backed org who provide free certs to encrypt. There’s still plenty of fine tuning to do still, but it’s pretty simple to use so I’m not concerned. In the first place, I’m not familiar with the practicalities of using encryption on my server, so there’s still plenty to learn.


Earphones

About a year ago, I played so much LLSIF that the earphone jack on my phone broke. The jack is right where I hold the phone and I guess it didn’t appreciate the constant pressure. At the time I only just got the phone so I didn’t feel like returning it for fixing, so instead I bought bluetooth earphones. This proved to be a good choice, since a few months later I started going to the gym every day and not having to carry around my phone to have music is great there.

I bought Jabra Rox, and it’s working just fine to this day. Its batteries last for 2-4 hours depending on volume, which is sufficient for me as I mostly listen to music commuting and in the gym (which totals a little over 2 hours). The sound is all right too. There’s enough bass to satisfy me and the rest works just fine too.


The myth of a Perfect Japan

Sometime last year I stumbled upon a clickbait article: 16 Life-Changing Lessons I Learned After Living in Japan For a Year. As the title suggests, the author goes through 16 aspects they find amazing in Japan. The issue is, as apparent in the comments already, is that most of them are superficial or simply not true.

Now it must be stated that Japan is a great place if you are a guest. Most of the article’s statements are true if you are not a part of any social group – or at least not of the social group that you’re interacting with. These are formalities that you are expected to show off towards people you want to impress. These are manners you can use to feel people indebted to you. And mostly, it’s something you only do if you want to be specifically nice.