Minecraft

History

It’s interesting that I purchased my old Alienware M14x R2 just to play Minecraft.

Years ago, a friend I knew on Achaea said that they really enjoyed Minecraft, and that I should try it out. Well, I totally did, and totally regretted it. That’s because at that time, all I had was my Dell B120 from college, and for no strange reason, the game would not run at all, or if it did, the lag was so severe that I waited for 20 minutes for the FPS to progress for one frame. So instead of the minimum desired FPS of something like 60 FPS, I was getting something more like 1200 SPF — great sunblock, terrible game experience.

A few years later, in 2013, another friend from another MUD recommended I try it out. He’d been playing for a long time before I started, and knew quite a bit, and I gave him a rundown of my experience. I also told him I was still super interested in this, and that we’d just bought my mom a new laptop, and that it would maybe be able to handle it. I gave the demo a shot on her machine, which required quite a big Java update, and pretty soon was running successfully (albeit with still-pretty-severe lag) Minecraft 1.4.7!

It got me hooked immediately. I played a good, solid week in the evenings, installing a few optimization plugins installed (namely Optifine) and managing to get it running semi-decently on my B120. However, the lag was such that after a while, I found no progress being made due to resets and deaths and all sorts of other things. Not the ideal learning environment to say the least.

So after a few months of saving up, I bought the Alienware, and did not regret the decision. After that we had a single player shared out to a port and were going multiplayer. Hooray!

Today, NoDumbQuestions!

Fast-forward to now. A podcast of which I’m a huge fan, called NoDumbQuestions, has a moderator on Reddit who goes by mvoviri. Quite a while ago he started a Discord server for some of the fans, and I jumped in on the ground floor which, in typical Discord fashion, means that I haven’t felt like the newcomer, and have stuck around. A couple months in, he asked, “Hey, would anybody be interested in playing Minecraft?” and I was quick to respond, having set Minecraft aside every since about 1.7.4.

A few weeks later, there was the announcement, and he and another guy were quick to set up a spawn area, and I jumped in, and immediately remembered why I shouldn’t have stopped playing when I started galavanting about and died immediately, lost the starter equipment, tried again from scratch, lost everything again, and couldn’t even stay alive long enough to get a chest made.

It was a couple of weeks after that that I gave it one more go, and stuck with it. And in the past few months, I’ve done way more progress here than I have in any other server or single-player world! Well, besides my own server that I run from work, and play almost exclusively in Creative Mode on.

NDQ Minecraft Base

I’ve picked a cliff-top Taiga Mountain (half snow) area on which to build my main area. This was chosen specifically due to the dark overhand just from appearance alone. At the base of this cliff is a fairly wide Sunflower Plain with a few rises where I decided to place the livestock, since a mountain-top doesn’t offer many flat areas unless I were spending the time to get good tools, which I don’t usually.

Started with a small-ish house right on the cliff edge, and dug in to create the mine. Found a few natural caverns, and popped out on the back side of the mountain into a deep canyon where I built a small run of weird wooden letters “ATWHA” at semi-regular intervals. All with iron tools, because I haven’t played Survival in 5 years and even then never learned a THING about enchanting.

Hermitcraft

At this point, I started watching MumboJumbo in Hermitcraft Season 6. And oh my gosh, if you make it your profession to play this game, can you do some really cool stuff! I had no idea that half of the things these people were doing were even possible. Elytra? What in the world is THAT? I mean, I’d heard of it, but never even tried it in Creative.

Also watched Grian in the same series, and was super impressed. My goodness, two points of view make quite an interesting source of inspiration. Needless to say, I’ve got to expand this clifftop house into more than just a building underneath which lies a boring strip mine.

In this time, watching both of those Youtuber players through the entire season to date (11/2019), I’ve started a real strip mine with two block spacing, a series of nether portals that lead to an underwater stronghold (you can’t just build an end portal? I thought you could…) and an island not far away from it where I’ve made a remote base with good ocean proximity, and found one other player on the server selling fully enchanted elytra for 1 gold block.

After watching numerous Hermitcraft episodes, I now have so many ideas rattling around in my head.

Current Activities

I’ve made a huge amount of progress in the NDQ server, touching on pretty much everything that I can think of that I never saw before (enchantments, potions, elytra, mapping, ocean monument near the stronghold, economy with other players, automated redstone farming, and the nuances of mob spawning and contemplating why the creeper “farm” I built won’t spawn creepers at all!

Yesterday I tried mapping out the map blocks in and around my area. Then learned that ClearItems for Spigot is the most annoying, most brute-force method of saving server memory that could exist. I hit the ground too hard while flying around, and died. Okay, if I run back really quick I might be able to find all that expensive armor and weapons and tools. Not behind this rock. Maybe behind thi…. <[ClearItems] Deleted 29 items to reduce lag.>

Needless, this weekend did not see much progress in terms of big, fun projects, due to having to mine up new diamonds and paper for villager trades and enchantments.

Then late last night, I made a small, but fully automated sugar cane and bamboo farm. I had another one set up on the mountain near the house, but the weirdnesses surrounding minecarts and solid blocks were faulty, plus the room I had to work was very small, so I started a new one and put it down on the flat ground in the valley. It’s not too compact, but at least it works!

This morning, while watching Iskall85 doing his thing, I remembered ConCorp‘s “logo” map item that they’d made in-game and got the idea to do the same, only with NDQ’s logo. Quick made an empty, Zoom-level 1 map, hit the “teleport me to a random place,” and found a nice, relatively flat area and marked out the corners, then pasted the map along with screenshots up in my house. Thank goodness for /home and /spawn. They’ve made life much, much easier!

Manual letsEncrypt for CPanel

Jump to Renewal Instructions

At work I recently collaborated with our hosting provider to move our company website to a version of cPanel. Up until this time, there has been no way of running our site on SSL/TLS, and it’s been quite frustrating, having discovered LetsEncrypt and its ease of use. Basically, with this certificate signer, I have no reason to actually figure out the handshaking and signing process as was required in old command-line versions of SSL.

Well, our hosting provider’s version of cPanel has not really been expanded to allow for LetsEncrypt, even though multiple people on the cPanel forums say there’s a plugin available. Seems they don’t mind forcing me to pay another fee on top of everything to get an annual signature from the two default signers they had enabled in the system.

This made me wonder, and think, well CertBot, which generates the certificates and private keys and runs the signing requests automatically, always talked about this “cert only” option, and here on their website, I see instructions for a “manual” option as well. I thought this may have been exactly what I was looking for, since my scenario is – I have a website on a host who does not have LetsEncrypt enabled, but does allow me to upload certificates and keys from an offline source.

Here is my process of installing a LetsEncrypt SSL/TLS DV certificate on a cPanel site not equipped to generate one automatically.

Create a new certificate with any subdomains we’d need using certbot certonly -d c-pwr.com,www.c-pwr.com –manual

Certbot warns you that the computer’s IP you’re generating the certificate on will be shared with them, even though it’s not the server on which the cert will be installed on in the end. Type Y.
Without any “challenges” option in the original command, certbot assumes you’re using the acme challenge which involves uploading a text file to your site. Using cPanel’s file manager I simply do this.
Once the first file in acme-challenges is created, certbot asks us to create another file in the same place with a different string as its contents.
Once both files are created and saved to this location, we probably should verify that the URLs certbot is pointing to are actually visible from the public web.
 
Knowing that I can access the challenge files from my browser, I assume certbot will also be able to access them, presumably from a curl command or something, so I let it continue.
 
If we get the standard certbot success message, we now see that it’s created our certificate, chain and private key files in certbot’s standard location (I’m using the PPA repository through aptitude, so certbot automatically installs the latest versions of my certificates to /etc/letsencrypt/live/c-pwr.com/ , which are actually symbolic links to /etc/letsencrypt/archive/c-pwr.com/ , as every time we renew, it will archive the old files and create new ones.
 
I now can copy the contents of both /etc/letsencrypt/live/c-pwr.com/cert.pem  and /etc/letsencrypt/live/c-pwr.com/privkey.pemup  to cPanel in their SSL interface.
 
After this, I head over to the Manage SSL Sites tool and install this certificate as-is. It automatically detects the domains I specified in the original certbot command and applies the certificate to them.

Renewal

At this point, I have no idea how the renew will work. Since LetsEncrypt issues certificate signatures for only 3 months, this will become an issue sometime in August. I HOPE the acme-challenges will remain the same, but if they don’t, it should be a simple task to recreate the files as above, then copy the files in manually, assuming certificates and private keys can be edited once created in cPanel.
Renewing is super simple, but with this method must be run differently from an automated certbot renew.

 

  1. Run certbot certonly -d c-pwr.com,www.c-pwr.com --manual again.
  2. I am asked to create new acme challenges on the webserver which I did.
  3. Since the cert already existed in the /etc/letsencrypt/live, it detected this as a renew, and did not prompt me to upload certificates a second time!!
  4. I logged into cPanel and created two text docs in the File Manager as instructed, hit enter in my local server command line and it did everything from there.
  5. 2018-08-01: I forgot that I also need to update and re-copy cert.pem and privkey.pem to CPanel SSL/TLS Status in order for it to actually update, as cPanel just emailed and said my cert was expiring in ten days.
    • cPanel > SSL/TLS > Install and Manage (Manage SSL Sites)
    • Scroll down and select the old domain in the dropdown.
    • sudo cat /etc/letsencrypt/live/c-pwr.com/cert.pem
    • sudo cat /etc/letsencrypt/live/c-pwr.com/privkey.pem
    • Copy the certificate and private key text to the crt and key fields in cPanel.
    • Click Install Certificate.
Additionally, I needed to manually set up my .htaccess  file to redirect any http requests to the https version. This is usually done automatically by certbot during an automatic installation, and is embedded in the /etc/apache2/sites-available/000-default.conf  file, but since I don’t have access to this, .htaccess  will have to do.

USB Fast Chargers

I’ve been a bit confused lately at what constitutes fast charging versus normal charging, and why newer Android devices complain repeatedly if you use the wrong cable, or the wrong charger, or the wrong cable AND charger. How does it know?

Then I found an article on LifeHacker that partially explains it, but this comment thread clarified in an excellent manner: http://lifehacker.com/theres-a-bunch-of-misunderstanding-around-charging-via-1532885435

Continue reading “USB Fast Chargers”

PHP Access Control List

A quick little Access Control List (ACL) snippet I made for PHP/HTML. Enjoy!

<?php

$acl = array(
    // Populate with IP/Subnet Mask pairs.
    // Any zero bit in the subnet mask acts as a wildcard in the IP address check.
    array("192.168.10.24","255.255.255.255"),
);

$acl_allow = false;
for ($i = 0; $i < count($acl); $i++) {
    $ip2chk = (ip2long($acl[$i][0]) & ip2long($acl[$i][1]));

    if ((ip2long($_SERVER['REMOTE_ADDR']) & $ip2chk) == $ip2chk) {
        $acl_allow=true;
    }
}

if ($acl_allow) {
    // Put all test stuff here!! Only visible to ACL.
    phpInfo();
} else {
    echo "<a href='http://this-page-intentionally-left-blank.org/whythat.html' target='_blank'>This page intentionally left blank.</a>";
}

?>

 

Linux – Find what is Preventing You from Unmounting a Drive

Disclaimer: I’ve had this problem for probably four months, ever since I started running Plex Media Server on my headless linux machine at home, whilst storing all my actual media on a nice external portable drive. Usually I just yank it, but then I watch the drive letters run themselves up obscenely high before I need to reboot.

So you’ve gone through the process of mounting your drive in Linux:

> sudo fdisk -l
Device Boot = /dev/sdb1 (and a bunch of other technical information regarding drive size, id, and such)
>
> sudo mount -t ntfs-3g /dev/sdb1 /media/TOSHIBA
>

You run a bunch of stuff, get it all working, then find you need to take the drive to work the next day, so you try to unmount it.

> sudo umount /media/TOSHIBA
umount: /media/TOSHIBA: device is busy.
(In some cases useful info about processes that use the device is found by lsof(8) or fuser(1))
>

Continue reading “Linux – Find what is Preventing You from Unmounting a Drive”