Glorious Screenshots


not-coding workflow

ShareX

Today I want to share a tool I use which can step up your Internet game.

A lot of people already know about it: it’s called ShareX. Download ShareX HERE

ShareX screenshot

It supports sharing lots of different content, but I mainly use it for screenshots. It does two things: Capturing screenshots & uploading them somewhere to share.

It’s a little program that starts when your computer boots. It sits in your system tray. System tray

Killer Workflow

This is what I do with it:

  1. Press Ctrl+Alt+Z to capture a region.
  2. As I release the mouse button, I hear a little ding meaning the screenshot is uploaded.
  3. I can paste the link to the image I just made using Ctrl+V.

Setting this up is simple. Here’s a little tutorial:

First you have to download the installer, run it, then click next, next, next, next…. Probably make sure to enable that it starts on system start.

Once it’s installed, run it, the icon should appear somewhere around the bottom-right of your screen (on Windows).

You can right-click on the ShareX icon to get its settings: ShareX Menu

There’s a few settings, like all software. Feel free to click around, the worst that can happen is your computer explodes.

First thing I’d setup is the hotkey to capture a region. Under “Hotkey settings…”, the UI is intuitive:

ShareX Keybinds

Second thingy is defining what to do after capturing a new screenshot.

ShareX - After Captured

You can see there are three things selected:

The point of sending the image somewhere is so it’s always available. You could host these images with some URL to your computer, but then they wouldn’t work when your computer is off.

Kind of like uploading an image to Imgur. In fact, ShareX literally supports Imgur uploads.
That’s the third thingy to setup:

ShareX - Destinations

Hovering Destinations -> Image Uploader -> Pick imgur.

And that’s it, screenshots sharing!

Alternative to Imgur

I remember using the Imgur uploader for a few months. Then I switched to FTP upload on some VPS, then just went with Google Cloud Storage.

If you don’t want to spend a single cent, you may end your journey here.

Why not Imgur?

I had some issues with its reliability. The upload is on average kind of slow, sometimes it was very slow, and sometimes for a few hours it was just down.
This could be all fixed if you try it out today, this was 2 years ago.
Also can’t really blame them, it’s free after all.

What happened with the VPS?

A VPS (Virtual Private Server) is loaning a little part of a computer. The VPS provider (the host) will make sure it’s always up. I’ve used Vultr for my VPS. Vultr was great, nice web UI, decent support, good documentation, but eventually I ran out of hard drive space on the cheapo $5/mo VPS I was renting.

Vultr didn’t support (maybe it does now, idk) switching the hard drive. Re-installing ftp, nginx and transferring all the screenshots was time I decided would be better spent on a more scalable solution.

Google Cloud Storage

Amazon ships stuff to you, Google whispers you which stuff to buy. Both these internet giants have Cloud divisions, meaning they rent some their many many computers + some extra features.

One of those extra features is storage. Kinda like Dropbox, but targetted at developers. Like buying a hard drive, but you don’t have to worry about losing it if there’s a tornado in your house.

In other words, the killer feature of both Amazon S3 and Google Storage is that you can host terabytes of Pixel Painters drawings for a few dozen dollars.

There’s very little traffic to my screenshots, so the cost is 95% storage. A few thousand pictures per year, between 10KB & 1MB, about 4GB of pics, that’s max… $0.10/mo. Of course at larger scale there are bandwidth costs and request costs, but I just share my screenshots with a few of my friends. Just in case, I have a $3 budget limit on my storage account.

S3 Costs
I put a gif on my own storage for a Hypixel newspost in March so I had to shell out big money.

For compute, especially for Minecraft servers, I’m not a fan of cloud providers. I dislike the amount of marketing about them and the premium on bandwidth is excessive. But to make sure I get my commission, I gotta admit that for this use case, the offering is really hard to beat.

And here’s the real main appeal: ShareX supports uploading to a Google Cloud bucket.
I won’t detail how to set it up here, but it’s quite intuitive once you find the correct storage id.

Blottlenecking myself

When setting up the screenshots, I knew how I wanted the urls to look. This is purely preference, mostly cosmetic and is not bound in logic at all.

I wanted the links to look like: https://minikloon.com/pics/wormhole.png
This way I could make it fit with other sub-urls in the future.

Because I had some experience with it, I setup Nginx as a proxy to Google storage, then pointed minikloon.com to the VPS. This effectively meant I was losing the multi-region benefits of Google Cloud and if I suddenly had a picture of worldwide interest, it wouldn’t scale. + it costs extra.

Here’s the nginx config redirecting http requests and proxying the pic requests:

server {
	listen 80;
	server_name minikloon.com;
	return 301 https://$server_name$request_uri;
}

server {
	listen 443 ssl;

	ssl_certificate /home/minikloon/ssl/minikloon_net.crt;
	ssl_certificate_key /home/minikloon/ssl/private.key;
	
	server_name minikloon.com;

    location /pics/ {
		proxy_pass https://storage.googleapis.com/minikloon-screens/nudes/;
    }
}

Having pics.minikloon.com/wormhole.png could’ve worked. This would’ve allowed scaling at the DNS level. But I’d have to pay extra for the SSL cert (Let’s Encrypt didn’t exist). Plus I wanted the /pics at the end, cause it naturally flows from “where” to “what” when reading the address.

A solution to avoid the bottleneck: A few cloud services have load balancers with content-aware (aka url parsing) routing. But these usually start at something like $30/mo minimum, so not worth it.

CloudFlare probably does it for free using page rules, but only one page rule triggers per URL so it conflicted with some use cases.

Last tips

Random golden retriever puppy