Howl

this is where i come to cry.

>

PHP has come back

March 18, 2017

PHP is generally considered a pretty bad language. It has a lot of flaws, most of them you can see on PHP sadness, a really great resource if you want to get depression from code. But it’s got some neat features: it’s easy to develop in even for absolute beginners (has a very low entry barrier), and it’s easy to deploy. Its ease of deployment can be seen from the fact that the 11-year-old me managed to create a WordPress blog, without any knowledge of computer programming if not a bit of HTML with <center> and <font>, by simply unzipping the wordpress source and uploading it to an FTP server. Allow 30 minutes for all the files to upload (hey, my connection was shit and I didn’t know how to unzip a file server-side), and follow the 5-minute installer of WordPress: boom, good to go. Its ease of development can be seen by the fact that 12-year-old me made his first commit on GitHub… with some bad PHP code. But it worked! I was doing number comparisons using strings, the indentation was possibly one of the worst things you’ve ever seen, but it worked. I didn’t even know what a function was: a friend sent me a pastebin with an implementation using a function, and I was “wow cool i don’t know what this is but it looks nicer” and added it.

Since then, I’ve proceeded to rewrite all the code for OsuLevelCalculator, but that project still is like my first words as a child. Now I’ve grown up by a few years, and I feel like PHP is coming back, but under two different names: React (JSX) and Serverless frameworks. That’s right.

Let’s start off with JSX, shall we? This is an example of JSX I’ve found from somewhere on the internet:

<div className="red">Children Text</div>;
<MyCounter count={3 + 5} />;

// Here, we set the "scores" attribute below to a JavaScript object.
var gameScores = {
  player1: 2, 
  player2: 5
};

<DashboardUnit data-index="2">
  <h1>Scores</h1>
  <Scoreboard className="results" scores={gameScores} />
</DashboardUnit>;

Hmm… Where have I already seen that?

<div class="red">Children Text</div>
<div class="counter"><?php echo 3 + 5; ?></div>

<?php
$scores = [
  "player1" => 2,
  "player2" => 5,
];
?>

<div class="dashboard-unit" data-index="2">
  <h1>Scores</h1>
  <div className="scoreboard results">
    <?php
      foreach ($gameScores as $score) {
        ?>
        <div class="score"><?php echo $score; ?></div>
        <?
      }
    ?>
  </div>
</div>

We’re embedding HTML straight into our code. If this doesn’t remind you of PHP, I don’t know what does. We have separated the view and the controller exactly to have a separation of concerns and not having to deal with unmaintainable code, yet this now is modern React code? Jesus.

Then, Serverless. Serverless is like some shit in a chocolate-bar shape wrapped in a chocolate wrapper. It looks nice, but just when you start using it you realise it’s not really good. The problem with serverless architecture is that the only real thing you can do with it without using anything else is just Software as a Service. But why would you let a third party do computations which you can easily do on your own? This basically means that to become useful, Serverless applications must connect to a database, which for Amazon Lambda implies that they should probably use one of Amazon’s databases, if you’re using Cloud Functions you should probably use one of Google’s databases, and so on. So they become pretty useless.

Anyway, getting away from my rant and back to the PHP topic, let’s nail down what Serverless compared to classic servers: it only uses the resources it needs (it “autoscales”), and it requires the software that is ran on top of it to be stateless. Rings a bell? Personally it reminds me much of how php-fpm scales the amount of workers used based on the number of requests and how every PHP script ran needs to always initialise the connection to the database, redis, load all the includes each time it is ran. Which makes for a slow response time.

Why is every hipster now hyped for React and serverless? They’re just the comeback of what we already ditched as being inefficient. Why are we using black boxes to deploy our code to the web? We should learn from the past to understand what didn’t work and move on, not make history repeat itself.

/rant

Yay...?

March 18, 2017

There are a lot of things that I encounter while programming that make me go “Yay…?”. This is mostly to say languages, frameworks, things I’d like to start using that I’m still not quite sure if I should start getting into. I know that I would be much better off by using the alternative, however I just can’t be bothered to switch completely.

Today, I’m gonna rant about the variety of those things that I know I should get into, but I esitate to do so, mainly because of fear of not being able to do it, or for the lack of motivation/effort I’m willing to put into.

Let’s start off with vim. Oh, vim. I’ve been using vim for a long time now, just in the completely wrong way. I know very little about vim: you should move with hjkl (although if you’re a noob like me you just use the arrow keys), insertion mode is activated with ins, ideally you’d delete things by using the d command, but if you’re like me you just use the backspace in insert mode. I only really use on a day to day basis :w, :q and :wq, I often use :s/ and when I do, :@ and @@ come in handy. But that’s all I have been bothered to learn about vim. I know that after 4 months of using it I’d be much more better off as my speed would drastically improve, I’m just not sure I want to step out of my comfort zone which are editors like VS Code, Atom and Sublime into dangerous beasts like vim.

Here’s another thing: C. I only know so much about C: I know there are structs, but however there is no OOP/classes whatsoever. I want to learn C because it is a match for my love of simplicity and hate for the OOP world, and also I want to learn a language that performs even better than the one I currently use (Go) and I want to finally learn how to manage my memory. I want to get my hands dirty. However, still, I’m not quite sure I want to step into this dangerous world.

Graphical User Interfaces, aka UIs. I’m mainly talking about UIs for native applications here: those for websites, I know how to do. But for software? Fuck me! The closest thing I did was to play around with win forms, and I made a couple useful things with those. But however, as I soon realised, those aren’t really cross-platform, and if I want to do something about Windows, I better start getting to know GTK or Qt. And as Qt I believe is absolutely bloated, I should sooner or later pick up GTK, which is what I’m trying to do at the moment. I got as far as an “Hello world”, I’ll see if I can get further.

Vue. Vue is “Yay…?” because I’m mixed about JavaScript. I’m mixed about web development per se, really. Vue is nice. But I’m not sure if Single Page Applications and frontends made completely of Javascript with no real server-generated HTML are the way to go, and I’m still stalling on this.

Modern JavaScript. Continuing from the above, I’m not sure I should get into the whole system of ECMAScript 2015, but I’m thinking more of a “no” than a “yes”. Do I really want to write code in ES 2015’s complex language, with new classes bodged into the existing ones, function definitions now totaling to an amount of like 7, and imports, just to then have that code pass through Babel, a minifier, a horsefucker and then eventually get to the final minifed javascript build, that weighs something like 500kb for a simple piece of code just because you needed like 4 polyfills for new javascript functions that sometimes aren’t in older browsers.

Deciding what to do, what to start and what to learn is hard.

Ho il pane, ma non i denti.

March 11, 2017

Today is the 11th of March of 2017. It’s Saturday, the only day of the week that is able to give me some joy, as I have the entire evening to dedicate to what I love doing most, or at least what I thought I loved doing most.

Ripple is the single biggest project I’ve ever had the honour to co-found, and it has given me a lot of recognition and respect in the osu! community. But, exactly at this point in time, where Ripple had basically become the hobby of a life, and I contribute every day to make Ripple better, one step at the time, I start to question myself: is this really what I want to do for the rest of my life?

There’s a very nice Italian expression for this “Chi ha pane non ha denti”: “Who has bread has no teeth.”

Exactly when my hobby tiny little sideproject has made me happy as an individual, I start to question if I should really be spending my evenings writing code. Programming to ideate solutions is starting to be a burden, a boring thing, for sure not something I would like to do for my lifetime. Sure, it’s now knowledge that is deep into my brain, and has helped me in a number of occasions.

For instance, I know how to troubleshoot and to try to find a solution by myself, without having to rely on the help of anyone else. I rarely ask anyone apart myself on how to deal with a problem, and if I can’t figure it out I break it down, I try to see what could not be working, I go into the details as much as possible tirelessly. But now that I mastered how to do it, it’s just routine: nothing exciting in doing it.

Basically, it comes down to a few questions: should I keep doing this? How should I find the motivation again for doing this? If I should move on, where should I go?

Should I detach from the circle of friends I worked hard to get into or to build around myself? Is it time for a change?

I think I’m gonna start fixing problems in Ripple, until it’s just features I need to add, then I will see if I really want to continue to do this.

git.zxq.co is now just zxq. Also, gitea!

January 13, 2017

Alright, it’s been a while since the last blog post. You have probably noticed the blog was updated to use hugo and GitHub pages, since I couldn’t stand the slowness of jekyll and the pain of having to roll out my own system to publish blog posts on my blog. Either way, it works, the old links are kept working, so I’m really happy with the outcome. What I want to talk today is that zxq.co is now a website for git code hosting. Another one. Yes.

I made this decision 2 days ago, seeing as a few people wanted to have some free code hosting and perhaps even help us work on Ripple, which at the time being if you’re not an official developer is only possible through pull requests on the official repos, which are hosted at the former git.zxq.co, while those on GitHub are just mirrors.

“So Howl, wait”, you may ask. “Why should I choose zxq.co to host my code rather than something like BitBucket, GitGud, GitLab or even GitHub paying my 5 bucks a month while drinking my coffee at Starbucks developing front-end JavaScript on a mac?” The answer is, meh, you probably shouldn’t. I don’t really expect many people to use it apart from perhaps the circle of Developers on Ripple, so that’s why I’m gonna jump from a topic to another just so I can make this look like a slightly longer article.

So what I also did while migrating git.zxq.co to zxq.co was moving from Gogs to Gitea. Gitea is a fork of Gogs with the basic difference that it’s community-maintained. This basically means that the status of the project doesn’t depend on the main maintainer currently being at home, but rather on the community making pull requests, reporting issues and merging pull requests, which for an open source project this is a much better solution. At the current stage, Gitea already has a pretty much complete API, has reached a stable and frozen 1.0.0, and pull requests are being merged constantly, which makes it more likely to eventually become a private git solution comparable to, say GitLab.

The main reason why I don’t use GitLab is because performance and use of resources, which is also why I’m a fan of Go and most projects and libraries written with it: writing code in Go is fun, and the code you write in it will almost always be very fast and not resource-intensive. Yes, sure, garbage collection takes its toll, but nothing comes close to the amount of stuff needed by programs written in dynamic languages. That’s basically the resume of all the reasons of why I use Go as my main programming language.

So yeah, if you have a gogs instance and haven’t moved to Gitea already, you should definetely do that, and it doesn’t take much to do that. For me, it was go getting code.gitea.io/gitea, going into the folder, go build, copying the custom folder, the data folder, and adding the SSH_DOMAIN setting in the config. After that, everything was good to go.

The only slight criticism I have for Gitea is, well, the logo, which is one of the most horrible things in this world. But well, let’s hope a graphic designer happens to drop his eye on Gitea eventually and give the maintainers a slighlty more decent logo.

sc and dustman

October 9, 2016

In my career as a programmer and generally speaking software developer, I often had to deal with things for which I couldn’t find any solution online, so I decided to write a solution from scratch.

Once I wanted to make a “speedcoding” video, the coding version of speedpainting. “Use Chronolapse”, I hear you say. “I am a Linux user”, you hear me say. And while it is true that Chronolapse has a linux version, it’s also true that it fucking sucks. It crashed on me about 10 times when I was trying to use it, and I got pretty sick of it. So what did I do? I wrote my own! And so, sc was born.

sc stands for SpeedCoding, and it is, of course, a software for speedcoding. It really is something I wrote in a few minutes, and that I made for my very specific use case, which is using it on KDE (it executes spectacle). Its code is absolutely minimal, and it can be adapted to other “screenshot taking systems” very easily, because all you need to change is one function: https://git.zxq.co/howl/sc/src/master/screenshot.go. I’ve been using it to make my speedcoding videos, and various other attempts to do it, which always end up with being too long or too short.

Today I’ve made a second tool, which is always in the kind of same style. This time it took a couple of hours, but still not too long, and I didn’t write any particulary huge amount of code for it. And it also does one thing, and does it well. While it may sound stupid, this is my new spam filter. And it’s called dustman.

So here’s the story, which I predict will take slightly longer to explain. Basically, setting up an email server in 2016 still sucks. And apparently it always will. Anyway, I set up the email server on my server, zxq, way back in the past, like 2 years ago, and it has always worked ever since, in a way or another. Early this year I’ve made it work using my MySQL server, which basically meant I didn’t have to modify two files each time to add a new user. That had already been a nightmare to get working, but in the end I made it. Now, fast forward a few months, and here we are at me like 3 months ago. The amount of spam email I was (am) getting is amazing, I receive a spam email every 10 minutes, so the need for a spam filter is in order.

Digitalocean, from which I read the guide on how to setup the mail server, had a guide on how to set up spamassassin, which unluckily didn’t work completely. My desired behaviour is very simple:

  • Emails that are spam get in the Junk folder.
  • Emails that are not get in the inbox.

Turns out this is one of the most difficult things to do in the world, at least on my server. So I sweared and I sweared day and night, but still nothing. The best I got to was being able to receive email (with spam going to Junk), but no way in the world being able to send email. So I rolled back changes, but well, now spamassassin warned me with a nice *****SPAM***** in the subject line, which made deleting all spam emails fairly easy, but still, I was doing it manually, and you probably know how much a programmer hates doing things by hand. I postponed this job for about a month now, but finally, today I did it, and I wrote dustman, probably one of the hackiest ways of filtering spam.

What it does, basically, is get notified for file changes in the mail folder. If it’s an email being created, or modified, it checks the emails headers, and if there’s X-Spam-Flag and it’s “YES”, then it moves the file to the Junk folder. And since it uses file system notifications, it’s so fast to move stuff, that your email client doesn’t even notice it ever was in the inbox. Hack-ish, but it works.

Getting this cool stuff

Now, if you’re here, you might be wondering how you can download these things? Well, the easiest way to do that is to install Go, set up the GOPATH, and then go get git.zxq.co/howl/dustman git.zxq.co/howl/sc. Easy as that!

Building a large-scale osu! private server from scratch

October 3, 2016

Hello there! It’s been a while. In the past few months, I’ve been working in most of my spare time on Ripple, which is an osu! private server I built with a friend of mine, Nyo. Ripple is my first large-scale project I’ve built, and so I’d like to share my experience in my past year and something writing code for it.

A bit of a summary, for those of you not coming here from Ripple:

Ripple was born out of my mind the 12th of August, 2016. Few days later, my pal Nyo came in, and started contributing a hell lot of code, and in about a week or so, we were set up: we had a domain, we had the server working (it was score-only, it did not have bancho), and we were playing on it with about 10 friends of ours. But, shortly, after a month, I decided to shut down the project, because peppy was going to add HTTPS to osu!, and I believed it would have been impossible to get it working (turns out it isn’t). Fast forward from September to January, Nyo decides that it’s time to bring Ripple back to life, especially since justm3, a famous member of a certain osu! hacking community, released the source code of his bancho server.

The reason why we didn’t have a Bancho server when we started out with Ripple was that we were clueless on how it worked, and I, who was in charge of understanding the protocol, understood jack shit about it, especially since I knew little about binary encoding. Anyway, taking justm3’s code as reference, Nyo wrote a bancho server. It was ugly, it used PHP and MySQL (not even redis!), but it worked for the moment. We still refrained from advertising ourselves to the public, but we started allowing people to come in slowly, so we had more users than what we did initially.

Now, at this moment in history, Ripple’s very terribly performing. It’s all PHP, and as you may know PHP pretty sucks when it comes to performance, especially for real-time chatting and streaming systems. So the Great Rewrite started (I’m kidding, we didn’t actually name it like that).

So, how did we optimise Ripple?

Rewrite Bancho

The very first thing Nyo did soon after getting the PHP bancho (nicknamed potatobancho) done, was rewriting it in Python. And well, guess what, it worked waaay better. A lot of the code is still in use, although as usual a lot of it like in most programs has ben rewritten.

Rewrite the cron

So, here’s the thing. We had a PHP script up until a few months ago, that used to do some administration tasks such as recalculating Leaderboards, ranked scores, accuracies, and all that stuff. Here’s the source. It was first made in the first version of Ripple, and no surprise here, it sucked. Keep in mind that that was waaaay back, like when we had 300 or so users (today we have over 10,000). Since we wanted it to actually be fast and scalable, I took care of it and rewrote it in Go in about a week or so. This was the outcome (see especially the last part of it, where the workers are maximised). So it went from being a slow-ass script, to being a modular program that is super-fast and can do what was done in 3 minutes in 10 seconds or so. Even today, the cron still takes about 30 seconds to execute, and I’d say that’s pretty good scaling.

Rewrite the score server

This was another very important thing to do. As we grew, it became more important to have the responses to osu!’s unofficial API (the one the client/game itself uses) be done extremely fast, so that people can have a flawless experience playing the game. Again, this was done with Python. LETS is probably one of our most important projects, as it’s really the core of a lot of stuff, like leaderboards, score submission and downloading replays. While it’s still not fast as we’d wish it was, mainly for technical issues which would take a lot of time to fix, it’s still pretty fast and does a good fucking job at replacing the old PHP shitty scripts.

LIMIT 1

Something a lot of people forget to do when writing query is adding LIMITs whenever they can. As it turned out for us, along with adding a hell lot of indexes to our tables, LIMIT 1 made our second best imprvement in performance.

Getting rid of the current website.

If you do not have horrible taste in design, you’ll have noticed that Ripple’s design is absolutely disgusting as of right now. That’s the main reason why I am currently building a solution to that, which is codenamed “Hanayo”, from the Love Live! character. Also, there’s the performance reason to why I’m building it: the PHP version was very resource-straining and especially very slow. Usually pages took about 500ms to one second to generate, and when it comes to the admin control panel, it goes even higher than that, up to 2 seconds.

Currently Hanayo is really fast, and requests are usually ~100ms, still a huge improvement. I can say that developing Ripple in the past year has helped me a lot developing my skills as a programmer, mostly when it comes to building large-scale products, since Ripple actually is my first project that I can say really succeded. It is also the first project I start and make completely with a friend, which in my opinion means a lot, since it tells how much working together with someone else is important when making a project. For the two of us, the thing that drives us the most for what matters the development was the fact that whenever either of us doesn’t feel like developing for Ripple, seeing the counterpart doing work makes the non-working part want to go back to write some code. Now, I could probably write the previous sentence better, but I don’t want to go research way of saying it so that it doesn’t sound so completely fucked up. You get the point, anyway.

Snowflake IDs, JSON and Go

June 2, 2016

I’ve recently started making a library for the Discord API. The discord API uses snowflake for generating high ID numbers, and for preventing integer overflow in various languages they wrap Snowflake IDs into a string. This can be in a simple manner overcome by Go by passing ,string to the JSON tag:

type MyJSON struct {
	ID uint64 `json:"id,string"`
}
var m MyJSON
json.Unmarshal([]byte(`{ "id": "1956019865191951" }`), &m)
fmt.Println(m.ID)
// Output: 1956019865191951

playground

Neat, isn’t it? So now you have solved your problem with that busty uint64 being wrapped into a string, by simply placing ,string in the tag of your struct field.

But have you really?

I happened to have to unmarshal an array of these Snowflake IDs. Here’s what I tried:

var into struct{ Els []uint64 `json:"els,string"` }
err := json.Unmarshal([]byte(`{"els":["1941", "918592", "9581958129", "5819235812"]}`), &into)
if err != nil {
	panic(err)
}
fmt.Println(into)
// Error: json: cannot unmarshal string into Go value of type uint64

playground

So, how can we fix it? Well, custom types of course! Here is a trivial (and unsafe) example of a Snowflake with the methods UnmarshalJSON and MarshalJSON

package main

import (
	"fmt"
	"strconv"
	"encoding/json"
)

func main() {
	var into struct{ Els []Snowflake `json:"els,string"` }
	err := json.Unmarshal([]byte(`{"els":["1941", "918592", "9581958129", "5819235812"]}`), &into)
	if err != nil {
		panic(err)
	}
	fmt.Println(into)
}

type Snowflake uint64

func (f *Snowflake) UnmarshalJSON(data []byte) error {
	i, err := strconv.ParseUint(string(data[1:len(data)-1]), 10, 64)
	if err != nil {
		return err
	}
	*f = Snowflake(i)
	return nil
}

func (f Snowflake) MarshalJSON() ([]byte, error) {
	return []byte(`"` + strconv.FormatUint(uint64(f), 10) + `"`), nil
}

playground

As you can see, this soulution plays pretty nicely, and requires very little code. I’ve wrapped the type Snowflake into a package, with adeguate tests, documentation, examples and an actually safe implementation of the unmarshaller. It now gets down to this!

Pointers in Go

January 29, 2016

In the process of learning Go, I struggled in the process of learning how I should use pointers. It’s not very easy to find an handy guide online, so for all of the people on the interwebz who are attempting to learn Go and have come across pointers and haven’t understood completely anything, here’s a guide for you to help you out, made in words easy enough to understand even for a complete beginner.

For absolute beginners

Assume you’re in a world where laws of physics don’t exist and everything can be done programmatically, even delivering to someone’s home. You’ve just ordered a bottle of water from amazon. Before you used pointers, you would have done a function like this:

func (w water) deliver(house House) {
	house.PostBox = append(house.PostBox, w)
}

There’s something very wrong in this. In the request handler for the bottle order, if we check the house’s postbox contents after calling the function deliver, there is no water. What happened is that, instead of making a postman deliver the bottle of water to your house, we have copied an instance of your house into the deliver function, so now we have two houses being identical. Then we added an element to the PostBox of our copied house, and then when the function ended the copied house is destroyed. But the problem is, the original house got nothing into its postbox! To solve this, we use pointers.

In the real world

Let’s take some code.

package main

import "fmt"

func main() {
	caller()
}

func caller() {
	num := 5
	fmt.Println(num)
	sum(num, 2)
	fmt.Println(num)
}
func sum(num, add int) {
	num += add
}

// $ go run test.go
// 5
// 5

So, our sum function isn’t working, because the number is the same. How can we fix this?

func caller() {
	num := 5
	fmt.Println(num)
	sum(&num, 2)
	fmt.Println(num)
}
func sum(num *int, add int) {
	*num += add
}

// $ go run test.go
// 5
// 7

What? Well, it’s actually fairly easy once you get the gist.

  1. In the function caller, num is an int.
  2. In the function sum, num is a POINTER to an int, which is transcribed as an asterisk + the actual type, so *int.
  3. In the function caller, in order to pass to sum the value of num by reference (the address of the house rather than the house itself), we are using &.
  4. In the function sum, we are using *num not because pointers must always be called by having an asterisk behind them. We’re using *num because we can’t add an *int to an int, so we are converting *int to an int, while still keeping num a reference and making changes to it.

tl;dr:

  1. *type is used to declare a type of a variable or the return value of a function. There’s no &type.
  2. &var is used to actually pass a variable pointer to a function, and satisfies *type (if var satisfies type, that is).
  3. *var is used to get the actual value of the variable passed via &type, removing the pointer info, so that you can use its value in calls to function which require a variable of that type, not a pointer to a variable of that type, and so on with operations.

This can be slightly confusing for the double use of * in types and vars, but practice makes perfect.

How to set up deployment of jekyll websites with gogs + drone

December 13, 2015

I’m not a big fan of wordpress (nor of any CMS in general). The main reason for that is because I like to save every single bit of my resources. The biggest CMS in the world is a huge memory hog. There are some lightweight solutions, such as Anchor, or if you fancy Python, my good ol’ friend QuadPiece has created his own CMS, flask-blog. Although, everything that is dynamically generated can’t be as low on resources as a static site.

About a year and a half ago, I came across GitHub pages, and thus jekyll. I’m telling you, I didn’t really even try to run jekyll at the time, because I was still a newbie to the programming world and I didn’t want to bother trying to set up jekyll via the windows guide. As I think to have already mentioned on this blog somewhere, I think developing on windows if you’re not actually doing .NET development is a pain in the fucking ass. That’s also the case for ruby.

Fast forward to about March of this year, I decided to replace my blog once again, and put it on the front page of my website this time (well, actually a redirect). Grabbed jekyll, a cool theme, changed it a bit, created a placeholder post, and boom, ready to go. Push to the website.

For the first times, I would have manually uploaded the _site folder’s content to the server. After that, I started generating jekyll on the server. Today I decided that had to change. So, I decided to put it under version control, as if it were a GitHub Pages project.

Few months ago I’ve come across gogs, which I think to be the best git system on the world, despite of it lacking many features. Why do I love it so much? Because performance! Yes! Gogs run on very few megabytes of RAM, and doesn’t eat much of your CPU, so due to my performance illness, it was perfect for me.

Shortly later, I’ve installed drone on my server, and integrated it with my gogs instance. It was running amazingly. I do not really use tests on GitHub, because the few times I’ve tried to set up Travis CI I failed, but with drone everything went smoothly, and I love it so far.

Getting back to the blog talk, I put my jekyll blog under version control, just like any 1337 on earth. I then pushed it to a repo on GitHub, and to create a system like the one on GitHub pages, I decided to set up drone to generate the blog each time I pushed something new to it. Here’s the end .drone.yml:

# Check that it builds successfully
build:
  image: grahamc/jekyll
  commands:
    - jekyll build
# And then push to prod!
deploy:
  rsync:
    when:
      branch: master
    user: $$SSH_USER
    host: $$SSH_HOST
    port: 22
    source: ./\_site/*
    target: $$SSH_FOLDER
    delete: false
    recursive: true

Understanding it is fairly simple: build the website, and then if the branch is master and the build passed, push it to the website via rsync. Easy, isn’t it? So now, I don’t have to do an ssh into my server for updating the blog. Yay git! Yay automation!

Well, that’s it for today’s blog post. Perhaps soon I’ll also make one about let’s encrypt, that recently got in Public Beta and I rushed to install on my server, although with problems, which I’ll fix sooner or later. Anyway, I should be sleeping right now, so see you soon! ~

non me la bevo

November 30, 2015

At the beginning of November, I’ve gone to Lucca Comics and Games, the biggest nerd convention in Italy. The awesomeness spreads in 4 days around the wonderful mediaval city of Lucca (yes, the whole historic centre is taken by the fair!), and it’s always the best way to finally meet your internet friends you used to just have seen in picture and heard on TeamSpeak until a few hours before. Although, like every year, everyone must say “yeeeah maaan this year lucca sucked, i ain’t gonna go next year”, even this year they managed to get more than 200,000 people in that small town for four days.

As I don’t give a shit about games anymore, and I’m not a very frequent anime viewer, you guessed it: I went there mainly for meeting people. And holy shit, worth every single cent. I went there on Saturday and Sunday, with a total of 2.5 hours for each travel from Modena to Lucca and vice versa. Anyone who doesn’t come to Lucca in the Italian nerd community is considered as a poorfag and sorrounded by people saying “MA VIENI A LUCCA PORCODIO”. This year’s award-winning lucca poorfag is Nyo! Ti giuro che se l’anno prossimo non ci sei ti mando Gian direttamente a Bari a menarti. <3.

Of course, these conventions aren’t all a bed of roses. If you think “a bed of roses” doesn’t suit here, then blame wordreference. Anyway. As I and Alex (a friend of mine) were walking on the walls of the city, we got stopped by these two guys holding some leaflets stopping people casually. Sure as heck they weren’t there for the fair. When they stopped us, they asked us for a donation. Gave us a voucher to both of us. Useless and way too much generic. Just a green leaflet, with a picture of a bear plushie with “GRAZIE DI CUORE” written on it. No info about them, nothing. Just a green fucking leaflet with a fucking creepy peluche that says to be thankful to you. You know, it didn’t take me long to realise these were the famous “truffatori sulle mura”, of which many frequent fair participants recommend to avoid. As I’m an Italian, and as such I must gesticulate while talking and be impulsive, the first thing I did after analysing the leaflet was to crumple it. And I was all about “let’s just get this sorted out asap” with my friend. These dudes weren’t willing to let go. So, guess what happened. Exactly. Arguing.

I explained them the reasons why I did not want to give a single cent to their cause. I asked them “What’s your association called?”. I can’t remember the name. When I picked up the phone for searching the name on the internet in order to to make sure they weren’t making it up, or in this case making sure they were, they said “Sorry, we’re afraid we’re not on the internette”. “Oh, how odd!” I replied. My friend in the meantime was just keeping silent, probably hoping to get over the question asap. In the end, I guess they learnt they wouldn’t have made out not a single cent out of my wallet. And so we managed to get away, while I and my friend were talking.

Zio cane se mi sta sul cazzo sta gente a lucca.

Eh immagino.

Ma perché te non hai detto niente?

Non volevo mettermici anch’io.

Or something along the lines.

Well, that’s enough, I guess. Gotta go to school tomorrow. And haven’t taken much sleep lately. And it’s already past eleven. And I gotta wake up at half past six. So, see you! (I might as well try to start posting on a regular basis on this blog. I’ll see).

Older

© Morgan Bazalgette 2015-2017