Widest Roman Prime
Posted on
One of my favorite joke Twitter accounts is @wacnt. It tweets things Wolfram|Alpha can’t answer. I’ve asked Facebook M to figure out a few of them and it did.
Here’s recent one that made me laugh:
widest prime less than 4000 when written as a Roman numeral in Times New Roman
Automated Bundle Version
Posted on
Lately I've been using a script to set my apps’ bundle version.
Add a new Run Script build phase. Change the shell to:
Put the following in the source area (right under the shell field):
What Color Is It
Posted on
One of my coworkers shared What Colour Is It in our design Slack channel the other day. It works by taking the current time as 6 digits and making that a hex color. For example, in the header it's #172952
. That's 5:29pm and 52 seconds. Kinda neat. I thought it was super cool so I decided to make it a screensaver.
You can download the screensaver here.
It's less than 100 lines of code. Give it a look if you're interested. I'm particularly fond of the font. I'm using new Swift 2 runtime checking:
Static
Posted on
Today, we open sourced a framework for iOS we've been using a ton internally called Static. It's a Swift 2 framework for working with static table views. We use it to power tons of screens in an upcoming project. It's also made prototyping table view-based things super productive.
Static's goal is to separate model data from presentation. Row
s and Section
s are your “view models” for your cells. You simply specify a cell class to use and that handles all of the presentation. See the Usage section below for details.
Static is written in Swift 2 so Xcode 7b3 is required. There aren't any dependencies besides system frameworks.
Git + Redis Backed Blog
Posted on
I switched back to the old blog I was using before Roon (this blogging platform I used to run). Right before Roon, I had all of these fun ideas for the nerdy blogging platform that I wanted.
The main idea was all of my posts lived in their own repo. This is great for a bunch of reason. Being separate from my blog's source code is nice since it changes every few years. Even when I was blogging on Roon and Ghost, I kept this up to date (with some scripts). I saw a talk from one of the guys that works on Archive.org and was really inspired to start saving as much as I can.
Since my posts are in their own repo, a simple post-commit hook can update my blog. GitHub simply posts to an enpoint on my blog that causes it to reimport my posts into Redis. Another added benefit is people can PR typo fixes. When I click the merge button on GitHub, the webhook fires and automatically updates the post on my site. Neat!