TIP: Enable Two Factor Authentication (2FA) with your NPM account

Since early October it’s possible to enable Two Factor Authentication with your NPM account. 2FA is another layer of defense for your account, preventing third parties from altering your code even if they steal or guess your credentials. This is one of the easiest and most important ways to ensure that only you can access …

Accessing a tweet using only its ID (and without the Twitter API)

See the Pen Twitter Tweet URL Generator by Bramus (@bramus) on CodePen. Today I learned that Twitter totally ignores the username in the “tweet detail route” on their website. This allows you to view details of a (public) tweet when knowing only its ID, without needing to access the Twitter API (which is the default …

react-native-maps-directions – Directions/Routing component for react-native-maps

One of the things I found missing in the aforementioned react-native-maps was the ability to route between to coordinates. Combining the feedback from the related issues on GitHub (#52, #778, and #929) I’ve created a standalone component that does exactly that. The MapViewDirections component can route between an origin and destination coordinate. As routing is …

XCode 9.0: Fixing a Slow/Unresponsive iOS Simulator

Whilst initially implementing react-native-maps into a project I noticed that the iOS Simulator didn’t quite like it. Whenever the Mapview was visible on the screen, the Simulator was maxing out on something. Turns out the OpenGLES.framework that comes with XCode 9.0 – and not react-native-maps itself – is the culprit. That version is buggy and …

Easier imports with Webpack’s resolve.alias

One of the things I find annoying when using import in my JS code is the fact that you need to refer to other local files using (relative) paths. Like so: // Without resolve.alias 😭 import Modal from ‘../../../components/objects/modal/modal’; Having a background in PHP – where you have include paths and autoloaders – I essentially …

Inspecting Redux Stores in Production, without the Redux Devtools

Checking out the Redux Store of Soundcloud Redux Back in the day I learnt a lot by hitting CTRL+U (View Source) on websites. Nowadays I still check the source code of some apps, yet it’s become a tad more difficult for some specific things. When it comes to React apps that use Redux I like …

The Thistlegorm Project

One of the most famous wrecks to dive on is that of the SS Thistlegorm, a British merchant steam ship that was sunk by German bombers on 6 October 1941 near Ras Muhamad (Red Sea, Egypt). The University of Nottingham, Ain Shams (Cairo) and Alexandria University have joined forces to create a 3D model of …

Strategies for Derailing a React Conversation

Fun list tweeted just now by Redux creator Dan Abramov: Strategies for derailing a React conversation: HOC vs render props Is binding functions expensive CSS in JS PATENTS Redux Web Components class vs className <If> Size of node_modules Context I wonder which ones, if any, will matter in three years. Always keep questioning the status …

Rendering Sites Fullscreen in Safari on iPhone X / Introducing “User Agent Variables” (CSS Environment Variables)

What the …? By default, the new iPhone X in landscape mode will contain sites in the so called “safe area”, resulting in white bars being rendered on either side of the site (src). The color, white by default, can be tweaked by altering the background-color on the <body> element. Do note that it’s only …

Silex Routing vs Trailing Slashes

In Silex-based projects I always define my routes with a trailing /. When defining a route with a trailing slash, the router will respond to both the route without and with slash: $app->get(‘/hello’, …); will respond to http://localhost/hello but not to http://localhost/hello/ $app->get(‘/hello/’, …); will respond to http://localhost/hello and to http://localhost/hello/ Unfortunately this only works …