How to Use Your Domain on Bluesky / / No Comments Bluesky is a hot new social networking platform that functions like Twitter from Twitter’s original founder. New users are flooding into the platform as a respite from Elon Musk’s vision of Twitter and the fumbles that have happened since his takeover. Upon signing up for Bluesky, your username defaults to {yourdesiredhandle}.bsky.social, but there’s a better and more secure option. One of Bluesky’s awesome features is the ability to base your username on a hostname’s DNS record. In short, if you control a hostname’s DNS, you can essentially verify yourself. For example, my Bluesky username is davidwalsh.name. Let’s look at how you can base your username... more → Posted in: JavaScript Tagged with: Bluesky, domain
The First Images from EUMETSAT MTG-I1 / / No Comments The first high quality image from Europe’s newest weather satellite has been released. The European Organisation for the Exploitation of Meteorological Satellites (EUMETSAT) operates a fleet of satellites with which it monitors weather, climate, and the environment from space. EUMETSAT’s newest satellite, Meteosat Third Generation – Imager 1 (Meteosat-12) was launched in December 2022 and is Maps Mania… more → Posted in: Interactive Maps Tagged with: EUMETSAT, first, from, images, MTGI1
Updating and Supporting URL Parameters in JavaScript / / No Comments Not quite a long time ago, but roughly two years ago I wrote a blog post on updating and supporting, URL parameters with Vue.js. The idea was this: Given an application that lets you perform various tweaks, it would be nice if the URL was updated to reflect the current state of the application. This would let you bookmark, or share, the URL with others and they would get the same view as you. In that post, I built a very basic "data filtering" application and then updated it to support updates to the URL. I thought I’d revisit that post and demonstrate building it in vanilla JavaScript. As always, I’d love to hear your thoughts on this, especially if you’ve done something... more → Posted in: JavaScript Tagged with: JavaScript, Parameters, Supporting, Updating
Where Students Travel to Study Abroad / / No Comments The European Commission’s Erasmus programme allows university students across Europe to study abroad as part of a continent-wide student exchange scheme. Under the programme students can study at a foreign university for up to one year of their undergraduate studies. Over the years more than 9 million European students have used the scheme to travel and study abroad.The Erasmus Network Maps Mania… more → Posted in: Interactive Maps Tagged with: abroad, students, Study, travel
CSS content-visibility / / No Comments The CSS language is full of small gaps which are frustrating to navigate. Between CSS properties to hide a container and its contents, there is still room for improvement. visibility: hidden keeps height and width integrity while display: none on a container hides everything. You can use .container > * to hide all contents of a container, but what if there was a better way? There is a better way to hide the contents of an element while respecting the container’s border and dimensions. That better way is using the content-visibility property: .my-container.contents-loading { content-visibility: hidden; } A demo of such functionality: See the Pen Untitled by David Walsh... more → Posted in: JavaScript Tagged with: contentvisibility
How to Get a Base64 Version of a File From Command Line / / No Comments A while back I wrote an article on how to Convert Image to Data URI with JavaScript. It’s a neat trick developers can use for any number of reasons. Instead of abusing canvas, however, why not simply get the base64 data from command line? You can use base64 and pbcopy to convert a file to base64 and copy it to the clipboard: # base64 gets data, pbcopy copies to clipboard base64 -i logo.jpeg | pbcopy Once you have the file data copied in base64 format, the URL format to use the data is: # data:{mime-type};base64,{data} data:image/jpeg;base64,/9j/4AAQSkZJRgAB...... While base64 data and data URIs do look cryptic, they’re useful to avoid making requests to other files. I use them... more → Posted in: JavaScript Tagged with: Base64, Command, file, from, line, version
US Car Fatality Hotspots / / No Comments The U.S. Department of Transportation has released a series of interactive maps which visualize where fatal road accidents are a problem on America’s roads. The number of roadway fatalities and the fatality rate on U.S. roads increased in 2020 and 2021. In Our Nation’s Roadway Safety Crisis the DoT has created a series of maps which visualize fatality hotspots, fatalities compared to the Maps Mania… more → Posted in: Interactive Maps Tagged with: Fatality, Hotspots
How to Get a Computer’s Hardware ID / / No Comments Cheating in online games is a huge issue these days — just ask anyone playing PUBG. Cheaters aren’t difficult for players to spot but vendors oftentimes don’t do enough to punish these villains. Krafton recently announced they would start banning cheaters by hardware ID, which got me thinking about how you can get a user’s hardware ID. There’s no definitive “hardware ID” provided by a machine, but you can create your own based on how specific you want to get. The hardware ID you create can be created from multiple pieces of hardware. Let’s discover how to get important IDs of different hardware components: # Get information about the motherboard... more → Posted in: JavaScript Tagged with: Computer’s, Hardware