I’ve been diving head-first into the zustand, which is a great library for managing global state in a React application. Their documentation have examples of middleware, but I was having a really hard time wrapping my head around what it was actually doing. I wanted two things out of my setup. I want: To have […]
I recently borked my Python 2 installation on Mac OS Mojave. I couldn’t reinstall because brew removed python@2. Or did they?! I found this post that allows you to reinstall like so: After running that command I was able to reinstall python@2 via Homebrew.
The fantastic Can I Use website has some great information on which browsers and versions support Intl.NumbeFormat:formatToParts(), however their data around Safari largely says “Support Unknown.” I needed to know specifics, so I did my own test.
I let an XCode project sit unchanged for a while, and when I got back to it I was getting the following error…
I have a few different projects that all rely on a different version of node. In a perfect world, I’d be able to use the Node Version Manager. However, currently the nvm command breaks when passing the –with-intl=full-icu argument (see GitHub Issue here). What I have to do instead, is build multiple versions of node from source, and manually switch. […]
I wrote a method to check whether or not the given environment (the browser or the node environment) has native Intl support. There’s a bit of a trick to this because there’s three possible states: Intl is not supported Intl is supported, but was only installed with system-icu (the default for node) Intl is supported, and was installed with full-icu support Here’s the method, […]
With the release of the iPhone X, I’ve found myself needing to have special conditions in a few of my React Native styles. Below is what I’m using to do that check. That’s it! Easy as that.
A lot of the current React Boilerplate projects feel so bloated to me, with a ton of extras that I don’t need. I’ve created this simple React Boilerplate that has the absolutely bare minimum that I need: webpack, stylus, and karma. No other bells or whistles. Enjoy! View Code
A few years ago I was watching a documentary called Cooked. One episode was about bread; sourdough, specifically. I became utterly fascinated by the fact that sourdough has only 3 ingredients: water, flour, and salt. The below post is my on-going recipe that I keep updated as I learn more about sourdough and improve my […]
There are many different links recommending you update many different config files to disable the screen from sleeping on a Raspberry Pi, but this is the simplest solution I’ve come across: Now open the app Click Settings, then at the top choose Disable Screen Sleep from the dropdown. Now you’re done!
I have a simple Backbone app that is being compiled down using gulp and browserify. I wanted to be able to include my template file with a simple node require() method, but node doesn’t like importing anything but JS files. If I tried pulling in the template HTML with jQuery’s $.get() method, as is often recommended, I was getting a CORS error […]
I’m knee deep in Swift these days, and am working a lot with the UIImage object. I couldn’t find a quick extension method that allowed me to resize an image based on the largest side, so I wrote one: You can use it like so: Good luck!
While creating a custom WordPress template, my site would crash when adding the search query string in the url. The url website.com/ worked fine, but once it became wordpress.com/?s=search+string it crashed without any kind of obvious errors. The problem was happening because I never specified the Post Page from within the Settings > Reading section of the Admin site. Once I did this […]
I’ve had a hell of a time finding a high resolution Android device on a blank background. Most of them have annoying glares or a dumb shadow that’s hard to cut around. Fear not, dear Googler – you can use mine. I also have an iOS one that I’ll upload when I get around to […]
I’ve created a custom UiTableViewCell nib with a text field, and I’ve had a hell of a time figuring out how to register text changes in my parent view. I didn’t find anything through Googling, so I figured I’d contribute the solution I figured out, using Swift: CustomTableViewCell.swift I created this file pretty simply. I […]