http://jseb.ca/" itemprop="description"/>

jsebean.com

Jonah's blog is here

Wise Words

- Posted in Politics by with comments

Just posting this quickly (excuse any typos or brainfarts, going for dinner soon ;) ) to say ExtraVM goes above and beyond to be awesome. Been using them to host a teamspeak server since last August (2016). We decided to get a dedicated server for ECMB since you need a good chunk of memory to start an Ark server, even though we're small (only ~50 members on discord last I checked eg).

Kimsufi has great deals on dedicated servers. I got my hands on one with an i5-3570S.

[email protected]:~$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 58
model name      : Intel(R) Core(TM) i5-3570S CPU @ 3.10GHz

Sure, it's not great, but handles Ark server perfectly for us and should be able to run a couple CSGO and Minecraft servers too. If it grows to the point we start getting lag, then of course we'll move things around and upgrade to a better server (from SYS or OVH directly eg).

However one of the issues we experiences in the past is the dreaded DDoS of script kiddies getting a kick of null routing me drawn in from the teamspeak server. We publicly list teamspeak as this is one of the ways we've found some cool people, but it seems to draw in the "cancer" too from time to time. To protect it, I've been a fan of ExtraVM after it being recommended on forums like r4p3.net.

It is great, but there comes a point that Kimsufi is still more affordable for certain projects, aside from not having the DDoS Game protection OVH seems to famously (or infamously when it doesn't work) offer.

Luckily, the awesome Mike A who owns ExtraVM goes above and beyond and gave me, at no extra cost a free IP I can use to setup a GRE Tunnel to the Kimsufi. I opened a ticket asking ExtraVM and he's quick to respond as always... unlike pretty much any other host I've been with (SYS was notoriously slow to respond to tickets eg). He did say that despite GRE module existing on all nodes, some people have trouble setting up GRE tunnels on his VPSes (suggestion others have tried and he has no issue with it) so my milage may vary. Only took a couple minutes and it worked without any issues! Whether some people just make a mistake or I got lucky being on a node that supports properly makes no difference to me, it I'm just happy :)

Given that ExtraVM's OpenVZ plans are hosted by OVH just like Kimsufi the pings are ~0.5ms, so it's not noticeable to any players. Even if I have to buy an extra TB or so of bandwidth it's still cheaper than buying SYS/OVH Game servers, and if we grow the point that I end up using too much bandwidth hopefully by then we'll be able to easily upgrade to a real game server anyway.

Anyhow, just thought I'd give a shout out to ExtraVM as it's an awesome company for anyone looking for an OVH reseller. I've seen some people criticize r4p3.net's reputation on zero day exploits, and I'll hold out my opinion on that too, but they do know their stuff when picking a good affordable host :) There's been a lot of hit and run hosts that resell OVH but it seems ExtraVM certainly is the exception as I've had no issues with them.

I don't play Ark or know anything about it, but with ECMB, people want game servers, and I'm their guy. I am running a dedicated server at OVH with Ubuntu 16.04. My brother "asabean" is the one who decided what config settings the ARK server should have, and he happily applied the variables in Game.ini and GameUserSettings.ini. He essentially just copied from his local save in Windows and pasted in the parameters into the file in the text editor in putty. Yes, it was nano. ;)

I'm a fan of the scripts from gameservermanagers.com, which is what I used to install Ark. It's very easy and way better than doing it manually through streamcmd as I quickly learned with running CSGO servers. It's nice to be able to just type ./arkserver install and ./arkserver update and not having to think about 'did I set force_install_dir correctly'? Heck... it's annoying when you think ~ will work with force_install_dir (normally meaning home for those who don't know) but instead it actually makes a directory named ~. Been there, done that, so anyway...

Getting mods to work was a challenge. It seems quickly googling how to do it isn't that easy with Ark Servers as there's a ton of misinformation out there, however Ark is supposed to download and run them pretty much automatically now I guess. Initially we uploaded the mod files from the Mods folder on Windows, and adding ActiveMods= in GameUserSettings.ini. (FWIW these files are located in ~/serverfiles/ShooterGame/Saved/Config/LinuxServer That didn't work.

Then I decided to add

[ModInstaller]
ModIDS=

to Game.ini and tried to start the server with LGSM. It failed. Checking logs showed some sort of segfault crash.

Huh... progress, but still not working.

Googling around led me to this thread on the steam forums. User "TheKurrgan" explained that the automodinstaller or whatever it's called in Ark depends on SteamCMD that doesn't exist in the proper location (turns out, seperate from the steamcmd you used/lgsm used to install it), and so you need to add it yourself. To do so, in your serverfiles/ directory, navigate to Engine/Binaries/ThirdParty/SteamCMD. Then, make a new folder called Linux with mkdir Linux and then cd Linux. They then proceeded to download steamcmd with curl using curl http://media.steampowered.com/installer/steamcmd_linux.tar.gz > steamcmd.tar.gz (of course you can use wget or something else similarly if you don't have curl installed), extract it with tar -zxf steamcmd.tar.gz and execute ./steamcmd.sh.

SteamCMD will then update and whatnot, and when you finally get the Steam> prompt, just type exit and start your server.

It worked!

Now FWIW, I read elsewhere you need to have the mods in GameUserSettings.ini and keep them in order, so I kept just copied the same order from the desktop. How true or important this is was beyond me, I just took their word for it. The particular mods we used looked like this in the end:

ActiveMods=764326117,774762563,627340159,554678442

and in Game.ini

[ModInstaller]
ModIDS=764326117
ModIDS=774762563
ModIDS=627340159
ModIDS=554678442

Once I started the server with LGSM it downloaded the mods and all is well. Now onto figuring out admin commands and whatnot....

Anyway, that's what I learned doing this so far so anybody else who gets stuck on getting mods to work on a linux server, hopefully this helps!

Ban Islamophobia in Canada?

- Posted in Politics by with comments

After the terrorist attack on Parliament under the Harper government, the conservatives tabled a bill (and passed!) that posed a threat to free speech by banning what they interpreted to be "terrorist propaganda", even after running a political campaign ad that potentially violated the law.

Fast forward to now, it appears parliament is mulling over whether or not to implement the polarizing opposite in response to the recent attack on a Mosque in Quebec, which could potentially pose just as much a threat to free speech just as the previous government's bill did, if not more. It's certainly predictable. Conservatives push for the irrational hardcore removal of what they deem to be "propaganda", Liberals push for the just as irrational "compassionate" response of "this is systemic and it must be fixed". The motion?

a whole-of-government approach to reducing or eliminating systemic racism and religious discrimination including Islamophobia.

As if society today is predicated on "systemic discrimination". That it would be disruptive to change something so ingrained in our culture, yet must be done. Do these people even realize what that means? Systemic? There's never any statement to back up such a wide reaching claim, it's just accepted as "fact", and that's precisely where it all begins to fall apart. The accusation of a "systemic" issue in society gets thrown around so loosely now that it seems to have lost all meaning. The use of the word "Islamophobia" seems to only further promote this hysteria and adds to this useless rhetoric.

Yet the issue here is one and the same. Yep, I'm going to say that dreaded word again: interpret. If the motion is acted upon like the regressive left constantly lobbies for, it'll be all in how the government interprets what is and isn't okay when it comes to their view on what is "systemic discrimination" and what is "Islamophobia". The problem is by going in with such a shaky foundation there's no way it'll turn out too well.

Why can there be no in between? Why can't governments realize that sometimes, there is no great government or legislative response to these issues? A tragedy is a tragedy, and hate is hate, as bad as it may be. You don't need to make a distinction, whether it's targeted toward a religion, a sexual orientation, skin colour, etc, it's all wrong. Violence and extreme hate is already illegal under Canadian law. It's enforcement of existing law that is needed, not sensationalistic proposals based on emotional response.

I opposed the "ban the burqa" fad that made it's way across the country for its threat to freedom of religion. That certainly resulted in some absurd accusations on how I wanted to "implement sharia law", but ideologues seem to always act that way. Those people were on the right, but now with the left in power the lies seem to be coming from the other side now.

It should go without saying that I'm no defender of Islam the ideology. I oppose strict ideology in principle but I take a strong libertarian stance when it comes to important constitutionally protected freedoms like speech and religion. I want to see anybody's ability to criticize it's ideological fallacies further protected just as much as someone should be able to be a peaceful follower wearing a cloth on their head. The "everybody is racist" paradigm we're currently experiencing is a dangerous trail to be on and it seems it'll be the cause of another "free speech should take the back seat", all in the name of crisis.

See this article in the National Post on the threat posed to criticize Islam.

Microsoft debuted the "ribbon interface" back in 2007 to give Office a fresh new look to compliment its new features. Many complained it was counterproductive much like the former assistant present in office releases before 2007 (who doesn't remember clippy?), but honestly, it wasn't bad looking from a design standpoint. The fresh new design was the only thing that made me like it. Courtesy Wikipedia LGPL <http://commons.wikimedia.org/w/index.php?curid=25484245>

Going on that, in 2017, LibreOffice, the most popular open source office suite alternative ever since Oracle destroyed the forever loved OpenOffice, has also implemented its own take on the ribbon interface. However, while I'm no designer, it's not hard to tell from comparisons that not only have they implemented a functionally worse interface, they also did a splendid job of making it one of the ugliest by maintaining the pre-office 2007 design elements. Like please, using classic win32 tab controls instead of actually making it a "ribbon interface"? There's not even a little padding in the tabs? It's all crunched together.

libreoffice ribbon

Granted this is still "experimental", and the theme extensibility of some linux desktops does make it more tolerable, but let's be honest here, nobody in the ~1% of Desktop Linux users actually want this. Please, if you're going to invest this much time into it, at least make it look better in Windows, the platform that debuted this with the user base of pretty much the only users who will actually (maybe?) use it. Otherwise what's the point of wasting so much time on it?

So you logged in as root/user with sudo permissions... ok? You want to be at least 20% secure though, and the next coolest game server shouldn't be ran as root. You're just not as dank as Bryan Lunduke.

Perhaps it's Minecraft you want to setup, and you're going to use GNU Screen for running it in the background like a bajillion of online tutorials suggest.

You add a user for minecraft, but hey! Let's be a little bit secure and you use SSH Keys and don't want to be bothered to setup a key for your new minecraft user. OR when you run adduser minecraft you also add the flag --disabled-password or you used the good ol' useradd and didn't set a password because life goals or something.

Whatever the reason is, you don't want to be bothered with firing up another putty window just to run screen, you just want to su to the new user and do your magic.

Now you can always just run screen -dmS sessionname your command here and it will run the command specified after the session name. Assuming you didn't screw up, it'll work fine.

But what if you don't want --dmS? What if you want to attach to the screen session? Whether you're using screen -r or just starting a new session the classic way with screen -S, it doesn't work, all because you su'd in. Screen can't control your pseudo-terminal because you're really using the one from the user you su'd from yet you're running screen from the su'd user. It cries out in agony! Cannot open your terminal '/dev/pts/0' - please check. But alas.... just run this command first:

script /dev/null

Then run your screen session.

It'll work. You're welcome.

Happy monday!

TL;DR: If you just want the rewrite rules for Lighttpd, scroll to the bottom code snippet.

So like most every other PHP app I've worked with, everybody seems to support both apache and nginx but poor old lighttpd gets left out in the cold and has no support on how to configure it in documentation.

Well have no fear, because you'll have to pry lighttpd out of my cold dead hands!

A while back I setup a VHOST for jseb.ca on Lighttpd with an FTP server so I could integrate it with Sharex. One other feature sharex seems to support is "short URLs" using an API from a PHP script called YOURLS. So I wanted to install it on my low end box.

Now if you caught on earlier, this blog is hosted using a flat-file database platform called htmly, because my lowendbox with only 128MB RAM isn't really ideal for running something like wordpress. MySQL can sure eat the RAM, so I sort of decided to not use MySQL on this server at all.

SQLite on the other hand is a perfect candidate. While it locks the entire database when you're writing to it, something like a URL shortener is a perfect application, since it's pretty much read only. Only time it writes is when I decide to add a URL, which is a fast query and so few and far between, it's a way better candidate for a personal URL shortener over MySQL anyway.

Unfortunately, YOURLS doesn't support SQLite out of the box. Luckily there's a great project here on github that adds it. Sweet! That was easy! Install php5-sqlite on my Debian install, chown/chmod your stuff so PHP can write to the directory YOURLS is in, install it by going to /admin/ and we're all set.

However, first thing you'll notice if you're running lighttpd is you'll get 404s since lighttpd doesn't support .htaccess, which YOURLS generates when you first install it. A search around on the internet will find stuff like this, but all the snippets in the examples causes issues for me.

While the last post from gsdefender (from Apr 24, 2016) works, my index.html on jseb.ca doesn't! Now I know it's not special, but it triggered me that if you visit the root, rather than showing my index.html it resulted in a redirect loop which freaked out Chrome.

Now like you probably figured out by now if you read anything here, I'm not much of a sysadmin or programmer, but I know my way around enough to be dangerous. I never got my head around regex stuff, but a quick look at lighttpd documentation says the ?

match zero or one of the previous symbol

Previous being keyword here... I just removed it.

So, now, with a vhost setup and mod_rewrite enabled for lighttpd, my lighttpd.conf looks like this for jseb.ca:

$HTTP["host"] == "jseb.ca" {
    server.document-root = "/var/www/upload/"
    url.rewrite-once = (
#        "^/([0-9A-Za-z-]+)?$" => "/yourls-go.php?id=$1",
#        "^/([0-9A-Za-z-]+)?\+$" => "/yourls-infos.php?id=$1",

        "^/([0-9A-Za-z-]+)$" => "/yourls-go.php?id=$1",
        "([0-9A-Za-z-]+)\+$" => "/yourls-infos.php?id=$1",
)

As you can see, the original copy-pasta from the github issue is commented out so you can note the difference between the two. It works for me... now my uploads and shorturls both reside on jseb.ca and coexists pefectly along with an index.html. So hopefully this helps anybody else who wants to run YOURLS on lighttpd.

Why did they put the ? to begin with? I don't know? enter image description here