Big Sur was released yesterday, and even with its new shiny UI for controlling volume, Apple has again failed to add an option to limit it.
Now that we know we are not getting native volume limit control anytime soon we can put some energy into improving the script a little.
It even has some uses I haven’t considered when I wrote the script. …
Leaflet provides every basic map functionality you need but it’s meant to be as lightweight as possible. To go beyond that there are hundreds of third-party plugins providing different tiles, ways of loading and displaying external data, custom markers and paths, etc.
But what if you want to be able to start using Bing maps? Or use OpenStreetMap when your main provider is down, or you hit some request limit? You can always wrap your different providers on some abstraction over their corresponding libraries, but there’s a better choice.
Using Leaflet, with the same code you can easily swap which one you are using by changing your tile layer. …
Most of our GPS capable wearables let you export your data in GPX format, and that’s what we are going to analyze.
GPX documents are just XML files that store geographical coordinates.
They contain a metadata header, followed by waypoints, routes, and tracks. There’s also an extensions section for custom elements. You can check the whole schema here.
Routes are designed to be followed and tracks are more like breadcrumb trails, storing real data from an activity. …
At Trabe we had to batch process images from one of our client’s API and send them transformed to another one.
We needed to apply some default transformations to each image, preview all of them in the browser and let the user modify them and add new ones before submitting the results.
Then, the transformed images were sent to an external service as base64, using the canvas
This API lets us draw graphics using the HTML
Update: This article and script have a new version with Headphone detection, but the information in this one is still relevant.
Most of us listen to music while working at Trabe. Our headphones are a mix of everything: in-ear, on-ear, around-the-ear… some of them with noise cancelling too. We play music on our MacBooks using Spotify, YouTube, iTunes or VLC.
When the noise level in the office raises, I tend to turn up the volume. That’s not necessarily a bad thing, but at least in my case, my volume levels tend to go only up during the day.
I try hard to keep my music on safe levels, but when you keep raising it in small amounts it is hard to know when it’s too loud. At least until a colleague 10 meters from you says “cool song!”. …
Using CSS variables to customize our CSS files, and writing our components as we would normally do.
For example, a small
Button component could look like this:
But instead of having a
button.css like this:
We would have:
Note that we use BEM conventions, adapting them to our liking, but the styles themselves are self explanatory. …
In Trabe we like to use docz to document our React UI components.
It’s based on MDX, which lets you import and export code from your project and use JSX on markdown documents. It also provides ready to use components that make building your docs a breeze.
It gives you total freedom to create your docs, and you can see changes live while you write them.
It combines the readability of markdown and the power of React components.