Juju's Stupid Random Crap

rants about the life of a programmer

As usual, I like to prank people with good, original jokes on April 1st across my properties. Not these overused jokes everyone hates (for instance the local furry group deleted pranks because they were getting too much instances of the same overused, boring joke), but rather original and fun jokes. Or I try to, anyway. I didn't took much effort and time doing any of them this year as I didn't had any good ideas in advance, and I didn't had time to do an elaborate one, but here's a rundown of my pranks of this year.


I took one of our nastiest and weirdest members we haven't banned yet and I gave him the role of “President of CodeWalrus” on our Discord server (no additional permissions that what he already had, don't worry) and told him he bought CodeWalrus while drunk. Kinda fun to see him getting confused by this. Could also had done a press release with that, but eh.


For context, only the first chapter was online by then, and I was distributing some business cards of it at Nadeshicon this weekend. So I thought I could release Chapter 2 and just end it there with a downer ending where everyone dies? Didn't had a lot of feedback on it, though. I only released it in French for now but here's the ending for posterity:

Soudain, le rubis s'illumine à une vitesse et une intensité folles, puis explose. Tous meurent sur le coup. Les corps ne sont retrouvés que quelques semaines plus tard et eurent droit à des funérailles de héros.

Le vaisseau du précédent chapitre a également explosé en entrant dans l'atmosphère de la planète et personne s'en est rendu compte, seulement une pluie de débris dans un désert dans la partie chaude de la planète. Après quelques semaines sans nouvelles des astronautes, la Terre assument leur mort et leur firent des funérailles nationales.

MLP Québec

Again for context, the site is pretty much dead and unmaintained, but I thought I could announce we discovered a portal to Equestria somewhere in my hometown of Québec City on the Twitter account. Kinda low quality, but the tweets got a bunch of retweets and likes, so thanks for that :)

Well, that was it for this year, I thought of all of those the same day and I wasn't really prepared for those, but eh, that was fun :)

So yeah. I'm writing a book. It's called Zarmina. Pretty huge project I'm working on on and off for the last few years and it went through a bunch of iterations before what it is now... I do believe that if you sit on a project for long enough, it's going to evolve until it turns out pretty great. It's still a pretty big undertaking and a very ambitious project, I rewrote the first part I don't know how many times now under countless concepts and I procrastinated a lot of it, but I do think it's turning out great.

Think of it as what if Europeans discovered America today, in the 21st century. It's the story of Earth astronauts on a planet far, far away making first contact with its inhabitants. And they definitely know what this implies and what humanity have done in the past. Oh, and they're magic furries, because why not. (Actually, there's a reason for that, and it's so they're more adapted for the kind of cold climate they have and so they look more like a weird mix between a human and a cat.)

It's inspired a lot of Dans une Galaxie près de chez vous, a Canadian comedy/sci-fi show that aired in 1999-2002, with two movies in 2004 and 2008, right during my childhood. It follows Captain Patenaude and his crew trying to find in 2034 a new planet to move humanity on because they completely destroyed their old one beyond repair. Thorough the series, it's pretty clear that the Captain wants to do good: if humanity is given a new planet, maybe they'll take care of this one... He also take care to find a planet that isn't already inhabited by a civilisation, for fear the humans will completely destroy it. And in the last episode, they finally find the perfect planet to move humanity on, but of course the second the first settlers arrive, war is waged over the best grounds available and it's pretty clear they're going to destroy this one too. Even though the mission to find a new planet was a success, the Captain and his crew considers their own personal mission a failure.

Last month, I had the pleasure to be part of the team that organized a small convention about this show (think about these brony or trekkie cons, but we were a duggie con). Half of the actors were there, as well as the writers and creators. And what the creators said during their panel or video message stroke me. The message they sent 20 years ago about the fact we only have one planet and we should take care of it, well, it's still valid today. With the current geopolitical climate we have today and, um, (should I really name him) Trump, among others, it's more valid than it ever been before. And this is why they want to go back to this universe and write a third movie eventually. And a comic book. It's planned for 2019, from what I heard. And as a fan, I hope it's happening.

I think it's something like this that made this show great. One of a kind, even. It sends a message and it does it well while being funny and captivating people all around French-speaking Canada. It's kind of our own locally-produced Doctor Who or Star Trek.

So, obviously, if humanity would meet a race of magical cat people, what would they do with that? Who knows? This is an issue neither captain would want to go bad and get in a deadly war about that. This thing is about friendship, really. Friendship between people who are different and could potentially be abused because of said differences. And this is what Zarmina is about, two astronauts stranded on an inhabited planet with quite powerful beings who will need to overcome their differences in order to get back to Earth and hope these people on Earth will think like them when they'll get back to them.

So this is one of the things I want to do with Zarmina. We don't have a lot of good sci-fi over here that sends a good message and this is something I'd really like to do. And this is the kind of message I'd like to send with this. The other, it's kinda because of my experience as a web developer, I want to do something completely original, something that makes good use of the web as a media. Every chapter is going to have music, maybe even animations and other interactivity, if I can and when the story will need it. (Well, I'm not the best at drawing, but eh, gotta do my best...) Maybe also... learning? You're definitely going to learn something, won't say more :) Anyway, this is something I learned with the Internet, if you want to be successful, you gotta standout.

I've written 3 chapters and a half so far (under its current form, that is, I have a story under a previous form that covers the first 4 chapters or so I'm currently rewriting), the first one is online on the website and the others will be published soon once they're ready, in French and English. Meanwhile, you can have a sneak peek on Patreon and help me financially while I'm working on this, but yeah, I really like how it's finally ending up. It's going to be quite an experience... and I hope to show you all of this real soon.

So this is one of the things I worked on in 2018 that I'm proud of it and will definitely keep doing in 2019. Stay tuned for more of these things... 2018 sure was a weird year.

Well, it seems Mastodon have a problem with a particular spambot. As an instance admin, I investigated and here's my findings.

Symptoms: Accounts keep singing up on your instance. The username are all random syllables (kind of sounds like Japanese), they have random full English/American-sounding names, their email address are all from random domains as if their owner have a pretty big budget on that and they all have different IPs.

First step: Pass all of those IPs through the Whois database and find something in common. And indeed, they all seem to come from the same ISP, for the most part, so it's trivial to craft a command to get their IP ranges.

(Note: The next commands have been tested at the time of writing on a Debian 9 server, on other OSes, your mileage may vary. I say this because the BSD implementation of the whois tool is very different from its GNU counterpart, from what I can see. This also assumes that you're on the account Mastodon runs and cd'd in its live directory and you know that you shouldn't type the $ as it's your prompt. And you actually know what you're doing, make backups first, etc. Also install the ipcalc package first, it'll help.)

$ whois -i admin-c,tech-c GS19550-RIPE | grep inetnum | cut -f9- -d" " | sed "s/ //g" | xargs -n1 ipcalc -rn | grep -v deaggregate >> banlist.txt

(Actual command will vary from spambot to spambot, but it's the one the fediverse is currently plagued with and I have no doubt if there's another spammer it's going to be similar. Also from here, the instructions are for Mastodon 2.6, for any other software it's going to be something else, but yeah, you're basically going to kick IP ranges out.)

Now that you have a bunch of IPs to ban, enter the Rails console:

$ RAILS_ENV=production bundle exec rails c

Now this bit of code will tell you their usernames, to make sure you have no false positives.

File.open("banlist.txt","r").each_line { |ip| User.where("last_sign_in_ip << ?", ip.strip).each { |u| puts u.account.username } };0

And now, this is the fun part, destroy them!

File.open("banlist.txt","r").each_line { |ip| User.where("last_sign_in_ip << ?", ip.strip).each { |u| u.account.user.destroy; u.account.destroy } };0

Now you can't see them anymore. If you missed a few, you can always put their IPs in banlist.txt and repeat the process. Now to make sure they're not going to come back, you can either put them in your iptables or your favourite firewall, or put a blacklist in your nginx. Run this as your normal admin user:

$ cat banlist.txt | xargs -n1 -I'{}' echo deny '{}'\; | sudo tee /etc/nginx/blacklist

Then edit your nginx config and put an include blacklist; somewhere in your instance's server block. Don't forget to reload nginx!

And there you go. How to find out and destroy spambots for dummies. Have fun and don't forget to do this once in a while :)

Sources: https://mastodon.at/@pfigel/100076564629123760 https://github.com/tootsuite/mastodon/issues/109#issuecomment-298767655

Well, I guess this thing will be a really nice place to vent. Because, allow me to say this, and I think everyone here will agree: Facebook sucks.

I mean, if you ever need to talk to their tech support to either change the name of your page, there's a problem with it, or you even just want access to their API to integrate with your website (all true stories), let me get this straight, it's going to be a pain in the ass and take you months to get anywhere. What else, the timeline is not making sense anymore and it's showing more and more ads (actually, if you scroll too far it's going to give up, tell you you reached the end and just show you ads). Yet, it's still basically useful to reach your users and friends (even if it's going to cost you money to reach just half of your followers). I'd like to quit Facebook anytime, but that would mean moving all of my friends and their friends and their friends to something less terrible. And it's not going to happen anytime soon. Unless there's a new Facebook-killer out there... and that might probably be Instagram, and guess what? They got bought out by Facebook.

And that's just the tip of the iceberg, I'd tell you all night long about pretty much every social network out there. Talking about Twitter, YouTube, things like that. Thing is, these social networks have upwards of hundreds of millions of active users. Anything they'll do, someone is going to be angry. And they won't care if it's going to make the company stay afloat. It also makes it almost impossible to moderate because they're dealing with so much users daily. They're not going to sit with you and personally explain what's wrong with you and how you can improve (which is to me something any good moderator should do), they don't have time for that, instead pointing at their terms of service and make you try to figure it out, at best. They're too busy to code the perfect thing to make the copyright holders and governments happy, which is to me almost impossible without said good moderation or at least a decent rate of false alarms that would make the users happy. Which is probably also almost impossible without the AIs turning sentient, but eh, who knows?

In the end, it just makes your social network a terrible place to go. You long for the good ol' days where forums were still a nice place to build a community. It still kind of is, but Facebook groups are way easier to build and invite your friends on. Also easier to attract cancer, I guess. Discord is also a very nice one I'd actually recommend (and also Skype and IRC-killer), but it's a chat application and not very adapted to easily searchable long-form writing.

Enter the Fediverse. It's a set of applications that resembles Twitter, Tumblr, Instagram, YouTube and the like and have mostly the same functions as them, but they're broken down in thousands of servers that can talk to each other with a common protocol. And the best thing, you can have one of them! Of course, it'd need a bit of configuration and resources just like hosting a forum, but eh, worth it. That means millions of users you can talk to just like the big, centralized, for-profit ones, except it's broken down in units you can easily moderate yourself or with a small team. There's no central admin and you can just ban other people, but also other instances (that's what we call these units) if you don't like them. And it's very manageable.

In conclusion, well, there's no perfect solution, but it seems to go back to self-host everything. It's great if you know your way with Linux and you have a $10/month to spend on a VPS, or else you can always ask a friend. Just install the software you want and make your own rules. Even this blog, you can follow it on the fediverse. But yeah, if you're fed up with the rules, make your own. That's the internet for you. I really like the feel to be in control of everything, which is why I want to move to things like those, and if you're like that I really recommend you to do that, but I understand that some people are the complete opposite, they have no technical know-how and they'll like services that take their hands and do everything for them, so there is where general services like Facebook are useful, and even fediverse sites to a point (the biggest instances are half a million users already). But my point is, there will always be some place on the internet where you can be comfortable.

On that, I run things like codewalr.us (a forum for programmers), calc.news (a Mastodon instance) and this blog, feel free to join us if you want to be in a nice community :)

Yeah, let's try this out, cause why not. It used to be Tumblr (which you can still follow here), but I recently switched to Write Freely, just to see how nicer it is. And looks like it works so far.

A while ago I realized I followed way too much people and it distracts me a lot from writing long texts, that and there was way too much NSFW to go there at school, so I kinda stopped going there. And I've been meaning to create a self-hosted blog in its stead for a long while, I wanted something real simple, so when I saw this, I was like, yeah why not, looks like the thing I wanted, easy to customize, not a ton of Javascript and PHP that comes with it, and as a bonus you can follow this blog on the Fediverse, gonna try this.

So there you go. First blog post and I hope to write more on random things.

Edit: I'm reposting my best blog posts from elsewhere here for completeness. Have fun.

This article was originally published on Tumblr, reposting it here for completeness.

Well. I didn’t blogged that much in the past year or two on this toasters dot rocks blog, for some reason. My Tumblr timeline was looking like a disaster. Kinda like Facebook, actually, but that’s another kind of disaster. Oh well. I probably should blog a bit more and publish some texts I usually just condense in 280 characters on Twitter. Kind of a diary.

So yeah. A ton of stuff happened since then, in the past year or two. Dropped school, got a job in web development and now I’m working on a rather big project with a bunch of friends related to podcasts and content creators. (BTW, I’ll let you know when it’s ready :)) So yeah, after being generally terrible in college and having stayed way too long there, thanks to a Youtuber, podcaster and entrepreneur friend, I’m now in a situation one could just dream of. You might want to get all of the diplomas to get far in life, but if you’re creative enough, you don’t need to… Anyway, I can’t wait to see this project taking off, cause it’s a pretty good concept overall, it just needs a lot of thinking and challenges to overcome.

I’ve also been thinking a lot of my pet project, Zarmina, it’s also a project I wanna see done, I worked quite a bit on it lately, I finished the script for a demo, but I prefer putting the time on this other project since, well, this pays my bills :)

Anyway, can’t wait what live is gonna give me next, who knows?

So yeah, stay tuned for more entries in my diary…

This article was originally published on Tumblr, reposting it here for completeness.

Boy, I don’t use Tumblr very often nowadays. Well, I wanted to write this article because, first of all, I hate ads and I know everyone else hates ads, myself I have uBlock with the anti-AdBlock killer on, but I also know people depends on it to make some good internet money and they want to do everything so their users can see the ads, even going as far as blocking the site’s content unless AdBlock is disabled… I have reasons to believe you’d piss these users off instead. I want to help fellow webmasters into making a better Internet, so this article attempts to show a way to have ads on and keep your users the most diligent way possible. Here goes the long post…

Choose a good ad network

First of all, one of the first reasons, if not the first, people install AdBlock or similar software is that ads are one of the easiest ways to carry viruses and other malware, with Flash/HTML5 ads and such. So you’ll want to make sure, with the right settings on whichever network you choose, to only serve images, no Flash, no foreign Javascript that could carry malware inserted into the ad. The popular one is Google AdSense, I personally use Project Wonderful, which also lets your users continually bid on your ad boxes instead of the standard CPM/CPC model and only accept image ads, as far as I know. I won’t show you how to place your ads, but it does help if you’re reasonable about them. Think like a normal user who don’t want ads in their way and find a good compromise. Actually, more on that in the next paragraph…

Subscribe to AdBlock Plus’ Acceptable Ads Initiative

If you can convince your users your ads are not annoying and full of viruses, they are probably more likely to disable their AdBlock for you. The fine guys behind AdBlock Plus have published a set of guidelines to follow so your ad won’t be considered annoying. If you follow these guidelines to the letter and if you ask them nicely, they might whitelist your ad in their software, which would give you a bit of a boost in ad views and clicks! And it’s free! (That is, if your site is not a giant and make “more than 10 million additional ad impressions per month due to participation in the Acceptable Ads initiative”…) It’s a bit controversial, but hey, it works. If you contact them, it might take something like 2 weeks before they even get to your case and another 3-4 days before they add your ads to the whitelist, so be patient, it’s worth it.

Read more about it: https://adblockplus.org/acceptable-ads

Don’t block your content and convince your users

What is more annoying than an intrusive popup telling you to disable AdBlock? Your visitors with AdBlock on might as well leave your site instead of actually disabling AdBlock and you might lose views. So just don’t do that, or you’d give the impression you’re a greedy person and your site exists for the money. You definitely don’t want that. So when you detect your user has AdBlock enabled, you’ll still want to write a nice message above the fold, but nothing intrusive, saying something along the lines, “the website wouldn’t exist without the ad money” (because, well, that’s often why you put ads in there and users will understand that) and/or “I promise the ads are not annoying and full of viruses” (because you did the above like a nice admin). Maybe even mention the Acceptable Ads Initiative, you’ll show them it’s true and you followed guidelines from AdBlock software.

I mean, convince your users, and make as simple as possible

Another thing you can do, and I don’t think anyone did that yet, is to provide a subscription link to an AdBlock filter you made that unblocks your ads with the above message, like, “Click here to disable AdBlock/AdBlock Plus/uBlock for this site”. Your users will click on that link like if it was any other link to, for instance, close that message, it’s that simple for them. Again, I won’t show you how to do that (maybe in another blog post?), I believe there’s a bunch of tutorials on how to write filter lists and provide an abp: URL pointing to it, but I do think it’s infinitely better than providing something like 4 different sets of instructions for each adblock software, browser and operating system out there. If you did the Acceptable Ads step above, they will provide you with a set of filter rules they will put in their list, you can definitely use that, you can also ask them for assistance for making a simple list with those rules to host on your server.

So there you go, I think I went around the subject, I hope these guidelines worked on your website and boosted your ads a bit! Of course, you can’t convince everyone, some people are convinced ads are bad no matter what (that’s why the Acceptable Ads Initiative is controversial), but you still can add some nice users with these guidelines. Obviously, I’m not your visitors, so I don’t guarantee this will work at all, but eh, at least you tried and made your site better.

Read it all? Have a walrus, you can thank me later. Don’t forget to share it with all your friends who have websites!

This article was originally published on Tumblr, reposting it here for completeness.

You know what? I love those. They recently added some of them at the one in my town, pretty popular place after the summer festival taking place in Québec City each summer (we had the Red Hot Chili Peppers tonight, and tomorrow we’ll have Rammstein, so it’s pretty big). So yeah, after those shows the place is pretty crowded and no employee is getting a rest. So, since they added those booths, I do feel it’s helping them. I feel it’s helping the customers as well. You tap what you want, you pay there with your card or iPhone or whatever, you get a number, and you wait for your number. That’s it. Before (and guess you still can go that way), you had to yell at the cashier what you want, after checking the menu above them if there’s something interesting (and nowadays it’s TV screens so they put ads once every few seconds covering the whole menu it’s weird), and worse, if you’re a picky eater like me (shame on me I guess) you have to tell the cashier a list of condiments you don’t like (no pickles, no onion, etc.) and you’re never sure which condiments they put in what and they’ll forget to remove them half of the time it’s awkward and/or basically hell so I just ended up ordering chicken McNuggets all the time… And you don’t have a number so you just wait in a line your your order, not really a good thing if there’s a lot of people. But with the booths they tell you outright what you want in your sandwich plus whether you want like, 10 patties in your burger and numerous other options I should try someday. This opens up a ton of burger possibilities. And you get a number you wait for, so they can give the orders out in the order they want and process a lot at the same time pretty seamlessly, nothing that lines up endlessly, it’s pretty cool. Plus they can remove half of the cash registers (there’s still some for those who want to pay cash or order manually) without much hassle. 10/10 best move by McDo’s ever.

Anyway, I should write more rants like this on my blog that I hardly use anymore (Tumblr is beginning to get cancerous, guess I needed to get out of this for a while). And this one is not sponsored by McDonald’s Canada (although if you want to offer me this gold free meals forever card like Jérémy Demay got the other day I’d gladly accept lol). Join me tomorrow on another rant on SaGGeek, or how to get invited as a guest at a convention and cancel at the last minute. Not writing it now because I wonder if there will be more things to write about in the aftermath tomorrow (the con was today), but that was kinda sad. I’ll also have some project updates going soon, for those interested.

This article was originally published on Tumblr, reposting it here for completeness.

Well, I usually don’t give a damn about this, but after seeing my good friend Minty Root allegedly being butthurt over this and seeing a GIF of his work being (re)posted on Facebook without credit, it stroke me, and I figured I had a good argument about this.

For this post, I’ll use Minty as an example here, because I know how he’s set up on YouTube, but it works for most, if not all content creators out there. If you don’t know, Minty has monetization enabled on his YouTube channel, and his network, Channel Frederator, is giving him a good unspecified wad of money for his work depending of the views on his monetization-enabled videos. (If you wanna know, I’m not sure he’s allowed to tell, so I’m not saying anything, but I do know it’s definitely helping him pay his bills.) So if you repost his videos on your Facebook page like many do (including full GIFs, although a GIF of only one scene can be debatable), for each view the video gets on your page, I don’t know the exact rate but it’s probably one less cent in his pockets. So if your video has a lot of views, we’re talking about quite a lot of money here. Personally, I wouldn’t care if there isn’t any money at stake (like the creator hasn’t monetized the video, it’s blocked in your country and/or it’s a big company such as Hasbro, in that case a credit would still be appreciated, if known), but in this case I think it’s probably what you can call piracy and/or stealing from a small content creator.

So here’s a few best practices I can suggest you if you’re the owner of one such page:

  • Don’t download the video off YouTube (or anything) and repost on your page. Instead, link it directly from the source. In many cases, such as Facebook and Twitter, the video will still embed directly in your post when you click on it. In YouTube’s case, it have a lot of ways to put the video on your profile without outright reposting it, such as playlists.
  • At least credit the work you post with a link to the creator’s page, if you’re not already link to their work. If people liked that work, people will click on that link because they want to see more of that artist. You should always link to their site anyway.
  • Don’t follow advices to get more views on your page. It’s probably a conspiracy to make you steal videos as I explained, or at least a side effect of big companies’ marketing plans. It’s well-established Facebook wants to compete with YouTube and Twitter wants to do just like Facebook, so don’t let them.
  • Subscribe to your favourite creator’s Patreon or donate to them, if you like their work. It will make their day. Seriously. Or just support them in any way they let you. As I stated, it might help them pay their rent.
  • Disable AdBlock on your favourite websites or creators. It will also help them and give them some ad money, if they set up these ads. Beware, in some cases, it’s just the creator’s platform’s ads and it’s not actually going to them.

It’s a pretty long post, but I bolded the tl;dr parts for better reading. I don’t want to go in a crusade against those pages, I still love you, but we all do want a better world without all this bullshit. If I missed anything, please tell! I hope my point is understood and more people will follow those advices, so reblog this post wildly! (Of course, if you’re gonna reshare it on other sites than Tumblr, credit me with a link, I probably spent at least a full hour to write this…)