Showing posts with label internet. Show all posts
Showing posts with label internet. Show all posts

Wednesday, February 12, 2025

GitLab Pages + NameCheap registrar + Let's Encrypt certs

Nerd Alert:  This post is purely in the hope of saving someone (my future self included) a whole lot of time and anxiety.  It's another one of those really specific combinations that cause trouble, which I keep seeming to find.

The short story:

A Record@35.185.44.232
TXT Record@gitlab-pages-verification-code=...
A Recordwww35.185.44.232
TXT Record_gitlab-...-code.wwwgitlab-pages-verification-code=...
CNAME Recordwwwmyusername.gitlab.io.
  • mysite.com and www.mysite.com had to be separate domains in GitLab Pages.
  • The second TXT record is most of the host value GitLab Pages suggests, but ends at "www".
  • That last CNAME record, I had to add after setting up letsencrypt on www.mysite.com.  (There was no such trouble with plain mysite.com.)

GitLab is amazing, its Pages service is wonderful, and its documentation is even mostly pretty good.  NameCheap is what it says on the tin, domain names for not much money.  Its "clever" DNS config is not my favorite, but it's better than how the entire management UI is broken about every odd time I try to use it.  Let's Encrypt (letsencrypt.org) is half of how web certificates should have worked in the first place (the second half is decoupling identity from encryption, but I won't go down that road).

Anyway, GitLab Pages itself says one thing, its documentation says another, and neither match up to NameCheap's DNS tools.  I had a variation of these settings which worked for domain verification but LetsEncrypt still failed.  I never learned what part was mistaken or why either, since no actual errors are reported; the UI and email report literally say "something went wrong".  Gee thanks.  But, the settings above worked, so I'm preserving them in a public place.

My final note, about the CNAME record, makes me wonder whether in 3 months I'll have trouble again when the letsencrypt cert renews.  But, I'll cross that bridge when I come to it.

OK, that's all.  I hope it saves somebody some headaches!

[edit, some time later: here's a similar table for gitlab+dreamhost]

A Record@35.185.44.232
AAAA Record@2600:1901:0:7b8a::
TXT Record@gitlab-pages-verification-code=...
TXT Record_gitlab-...-code.wwwgitlab-pages-verification-code=...
CNAME Recordwwwmyusername.gitlab.io.

 

Wednesday, December 18, 2024

How To Fix: YouTube Videos With Incorrect Aspect Ratio

As I've babbled about before, one of my pet peeves is to find images and videos being displayed incorrectly -- that is, in a shape other than the one for which it was originally created.  Just as the world was starting to settle on 16x9 being the shape of pretty much everything, phones and now even laptops began carving out gruesome holes and corners in their displays, to say nothing of the proliferation of hideous portrait-mode videos...  But, that is a rant for another day.

Today, I'm sharing a hack which takes just a few seconds for fixing the many many YouTube videos floating around (plenty of which are otherwise quite nice) which incorrectly squash or stretch the image.

When you come across such a video, hit F12 or otherwise open your browser's developer tools.  Don't let that phrase frighten you!  The wonderful thing about the web (which corporate bullies at best ignore and at worst go to great lengths to hide) is that there is no meaningful difference between a viewer and a developer.  There never was and never should be.

Use the DOM inspector and element picker to find the <video> element.  YouTube's code updates properties of this element constantly, so making any changes here won't do us any good once we resize the window or use full-screen etc.  So what we want to do is pick the next element upwards in the food chain, the <div> which contains the <video>.  Simple enough!

When we select it, we can see that this <div> element has a few CSS (style) rules already.  We're going to add one as follows:

transform: scalex(0.75) !important;

...And that's it!  You can close the dev tools, toggle fullscreen and back, and the video which was being stretched out will now be presented in its intended, correct shape.

The fine print:

Scaling the X dimension to 75% is a number I pulled out of thin air which happens to look about right for 4:3 images being displayed at 16:9.  Occasionally, you'll encounter videos for which you'll want different values than 0.75, or maybe even to use scaley() instead of scalex().  But most of the time, this is going to be (approximately) the right way to fix a stretched image.

Monday, June 11, 2018

End of Another Era

Today the internet as we know it begins its official retirement from being a powerful tool of individual voices.  It is being actively repurposed to serve instead as a tool of late-capitalist and autocratic forces.

Not that the internet hasn't been in decline as it is.  Not that long ago, nobody could even take a stab at how many significant entities there were on the internet.  Every university, every business, every city, every artist, every enthusiast.  Protocols kept springing up - telnet, email, usenet, FTP, gopher, IRC, HTTP -- there were many ways to use the internet.  Now, you can count off a small handful of for-profit companies and account for an enormous percentage of the internet, both in terms of traffic and ownership.  Non-HTTP (well, HTTPS now) traffic is actively blocked as some kind of scary unknown.  Where there was once a young and curious power widely distributed to anybody with some basic technical chops, there are now giant silos of control, a select few in charge of nearly everything.

Today, the (ill-gotten, illegitimate, incompetent) US government has made the situation much, much worse.

ISPs, gatekeepers of the final mile of the internet, are now free to return to the corrupt practices they were dabbling in before the FCC's Net Neutrality rules were enacted just a few years ago.  Comcast (or any internet service provider, but they are the ones who bought the current, illegitimate FCC) can now treat any internet traffic any way they like.  Somebody tries using a competing service like Amazon Prime or Netflix?  Maybe slow those streams down, unless somebody pays a little extra.  Somebody's going to a site which compares service across various providers?  It's legal now to send them a censored or altered version of the site.  Somebody's accessing a blog which points out the devious practices ISPs are now allowed to employ?  Maybe just return a 404 Not Found instead.  All legal as of today.

ISPs will tell you people like me are chicken little, crying about a non-falling sky.  We had years of no Net Neutrality rules before and everything was fine!  (Well, during those years, the diversity and distribution of information and leverage on the internet dried up, consolidating into the few giants we have now...)  If I was crying wolf about Citizens United, saying a great deal of money will now be spent lying to us, then I'm doing it again now.  Nah, we don't need regulations protecting citizens from greedy monopolies.  How silly!


I've become less and less convinced that even sweeping electoral victories will be able to wrest democracy back from the GOP - authoritarians do not play by the rules, and we've seen over and again the willingness to lie, cheat, and steal every seat, every gerrymandered district, every judicial appointment, every drop of power to the point where there are essentially no legitimate positions or institutions left.  I'm not sure how that can be repaired.  "Money is speech" really did a number on this nation; I'm an optimist at heart but I have a hard time imagining a full recovery.  One thing that hadn't been systematically corrupted was the internet; damaged though it may have been, there was still technically a level playing field, some small venue in life where money did not have a direct exchange rate with power.  Until today.

The US House of Representatives could still put the kibosh on all this and restore Net Neutrality.  86% of the US population is in favor of those protections.  It's not even partisan.  In this day and age!  86%.  But, that would require several Republicans to do their job, and represent the will of their constituents.  I've called mine, and I hope you'll call yours, begging to restore Title II protections and Net Neutrality, but I'm not going to hold my breath.  We know what we're dealing with here.  An irredeemably-corrupt party at the apex of their hostile takeover of what once resembled a republic.  Even with the most inept leadership imaginable, they've managed to chop up and sell off the entire government to the top bidders.  The internet, though a big deal to me, was just one tiny part of all this.

Of some small consolation is that when the United States is officially over, when every last drop of jingoist marketing value has been squeezed from its corpse, I'll at least still live in Minnseota, which is a beautiful place.  We've got our troubles too, but I think we might pull through, more or less intact.  My also-beautiful home state of Wisconsin has got an uphill battle, as it was the testing grounds for the national GOP takeover, but we're already starting to see the rats flee the sinking ship there.  Wisconsinites are no slouches, and you can't fool all of the people all of the time.  It will be tough, and there is a huge amount of damage to be undone, but I hope and think they'll figure things out too.

Things are likely to get worse before they get better, but my hope is that in that time, as more of the voting public will have grown up having active gunman drills in school where I had tornado drills, as the racists and the homophobes and the other piles of fear and ignorance die off, maybe we can overwhelmingly and legitimately get rid of the currently-invincible, infinite-money-wielding autocratic fascists after all.  I just hope there's something left to save.