Mark Miscavage Dot Com


Trump Is Banned From This Site

Posted: January 8, 2021
During my commute to work yesterday (that's what I call the hallway between my bathroom and bedroom) I was inspired by a shared tweet from a friend. I don't agree with Zuck on much, but the more things we can ban Trump from the better. So now I just need to figure out the best way to ban the Orange one from my website, which considering he doesn't have an account here yet is actually harder than it sounds. But hacking together random garbage for fun is my bread and butter, so we're off on an adventure!

First up is checking if my DNS or hosting provider can do any sort of location or IP based serving or in this case blocking. Given how janky and barebones this site currently is the answer to that is a resounding no. I don't even have a backend server at this point so we are going to have to get extra creative, or change hosing providers but I'd rather write code than click through someone else's interface.

Well my next thought is, Trump at this point is probably only in a couple of locations, and I can get the browser client location with permission or from IP Address lookup. Trump is unlikely to visit this site, and he is probably even less likely to allow browser location permissions, so I'll have to use IP lookup. A quick Google search leads me to https://www.geoplugin.com/ where I can make requests with a clients IP address and get back location information. Now I can see all the parts fall into place and I can make this happen.

At this point I can start writing some code, and if you read my previous post you'll know that I've been interested in giving Brython a shot; Well no time like the present. Cut to sweet hacker montage where I
  1. Got Brython and Geo Plugin working, which converts your browser IP to Latitude and Longitude
  2. Looked up the lat/long coordinates for Trump's most likely locations, The White House, Trump Tower NY and Mar-a-Lago
  3. Found a formula for calculating the distance between two sets of lat/long coordinates
  4. Connected the logic so if you are within 5 miles of one of those locations on site load you get a popup that stops you from reading this site's content.

Well that's it, Donald Trump is now 100% definitely, unquestionably, banned from markmiscavage.com (assuming he visits the site from one of his predetermined locations, and his ISPs location actually maps to a location within 5 miles of the coordinates I found), but what about all the innocent bystanders that will be caught in my broad net to squash the outgoing Presidents attempts to view my content. I can't just callously ban everyone else on the White House staff from viewing my sweet, sweet website. I need some sort of Trump-capcha to 100% affirm that someone who is at a banned location, is in fact Donald Trump.

Well I can do that with a bit more Brython code and a clever question no human (or computer) could possibly beat.

Click Here To Pass The Trump-Capcha Yourself

Now I think we can, with 120% certainty say that Donald Trump cannot view my content and no innocent bystanders will be harmed by my extremely secure and foolproof solution, and that makes me happy.

New Blog Who Dis?

Posted: January 4, 2021
My name is Mark Miscavage, I am a former national champion dancer with some acting credits and currently a software engineering manager based in Los Angeles. As I hope you can tell from that first sentence, my skills and interests are very broad. My intention with this site is to build out a place where I can write about and tinker with things I'm interested in, thinking about, laughing about, or learning at any given time. I intend to continue adding blog post style content, while also building out the website itself in a way that serves as a playground for my tech interests. If all goes to plan this will be a wacky, wonderful place that is a reflection of its creator, top to bottom.

I am also putting up this initial bare-bones post and site as a challenge to myself: If this site sits empty, with this as its only post all year, then I will know that I've failed to commit to something that I really want to do.

Finally, along with this first post (and probably future updates), I'm going to add a list of things that are currently interesting to me in some way, shape, or form.

If anything I've mentioned is something you'd like to hear more from me on, you'll have to let me know on Twitter @chick3ndinn3r, until I build out some kind of comment section.

Things I'm interested in or thinking about right now: