Hey! This is my boring assed blog, where I write about shit that you probably don’t care about. To be honest, I don’t really care much about it either, but it’s a way to make me write, which is something I’m not great at, but would like to be better.
Reality Christmas with Over the Rhine
My group at work recently got moved to a different department. I don’t necessarily view it is a bad thing, but it certainly wasn’t expected. Being moved from Investments into Risk Management almost certainly makes sense given the type of work that we do, I get to keep my manager who is amazing and his new boss is somebody I haven’t worked with before, but I knew socially when he worked on our floor and is a pretty good guy. One of the nice things about the Risk group is they do a lot more social things, which I appreciate because while I’m not against social gatherings, I generally won’t think to organize them on my own. So far the events seem to be well thought out and just the right amount of fun while also being appropriate for the workplace. This year as part of one of our larger meetings there was a poll about our favorite holiday activities, foods, songs, etc. The question about favorite holiday song made me laugh because my favorite holiday songs are almost certainly not the same as most folks.
We are not a cat rescue
This is #17. He’s named #17 because over the last several years we have caught, neutered and rehomed or released more than 17 cats (sometimes we get kittens so we end up with 7a, 7b, 7c, 7d - I’m pretty sure we entertain the vet office very much). Thankfully our vet is absolutely amazing and gives us a deal when we fix strays. Because we live right off the freeway, are a bit out of Columbus, and because for some damn reason folks think barns are a great place to drop off cats without asking we end up with a lot of cats that get dropped off. Over the years we’ve begun to refer to ourselves as “Not a cat rescue”.
If you dear reader have ever considered dropping your cat off in the country because you couldn’t take care of them anymore, please consider a few things:
Hosting from AWS with GitHub
Back at it again
Well I certainly haven’t done much with this lately. Part of that is I just feel like I didn’t have much to say and part of it is the setup I had was a little too much of a pain to deploy. Because, you know, actually having to log in and push 2 or 3 buttons is so much of a pain. Anyway, I got a bug up my butt and figured out how to build things with AWS and GitHub and did a small project over at Evil Peep which has been sitting dormant for around 12 years. I figured while I was at it I might was well implement it for my site and use the opportunity to move from my old domain to this one! While I’m at it I figured I’d document what I did to make it all work.
History of carltracy.com
Disclaimer
First off let me say that I am by no means an authority on web technology, I wanted to re-do my website and part of that is making content. Writing is one of the things that I really suck at doing so I’m basically forcing myself to do it here, and part of that is discussing the technologies I’ve used over the years to build it.
How my websites were built
The early days
Back in the mid to late 90s, around the time I was graduating from college, the web started to become a thing. It was this neat new tool that would allow you build something that anyone in the world could see. The functionality was pretty limited and a good portion of the content was written in HTML (hypertext markup language), by hand, in text files and had to be set up manually on your system (usually in a directory like ~\public_html\). You had to set permissions and do all sorts of crazy stuff to make it work and even beyond that you had to have access to a computer system that allowed you to host websites.
Tiktok Shortcode for Hugo
Tiktok shortcode for Hugo
When i was trying to post my adorable Tiktok of a wee baby duck that was just hatching, I couldn’t find anything about embedding Tiktoks into Hugo. I tried just pasting the embed code into a markdown page, but it didn’t work so I wrote a quick and dirty shortcode to do it:
tiktok.html:
Save this code in \layouts\shortcodes\tiktok.html
<script async src="https://www.tiktok.com/embed.js"></script>
<blockquote class="tiktok-embed" cite="https://www.tiktok.com/{{ .Get "usr" }}/video/{{ .Get "id" }}" data-video-id="{{ .Get "id" }}" style="max-width: 605px;min-width: 325px;" >
<section>
<a target="_blank" title="@chaos46692" href="https://www.tiktok.com/@chaos46692">@chaos46692</a>
<p></p>
<a target="_blank" title="Music" href="https://www.tiktok.com/music/{{ .Get "music" }}">Music</a>
</section>
</blockquote>
Parameters
On a tiktok video when you select “Share” there will be an option to Embed
Formula for the Weighted Average Life of a Mortgage
A while ago for work I had created a process that required a formula for the weighted average life (WAL) of a mortgage with level payments. I found one online:
$$ W = N D_N - \frac{1}{r} $$
where:
$$
\begin{aligned}
d &= { 1 \over 1 + r} = \hbox{one month discount factor} \\[7pt]
r &= {a \over 12} = \hbox{monthly discount} \\[10pt]
N &= \hbox{Loan period in months} \\[10pt]
D_n &= {1 \over 1-d^n}
\end{aligned}
$$
That formula is pretty convenient because it means given a rate and a WAL we can solve pretty easily for how long the loan has to be in order to have a particular WAL without doing a bunch of infinite sums. So where does that fomula come from? Originally I found it here , but I wanted to see if I could derive it.
Setting Up Hugo with SSL and MathJax
I’ve had a lot of fun setting up Hugo to set it up how I want. I will caveat this with a few things - I tried to do things the right way (not editing the theme directly) but I’m really really really fucking impatient and in a lot of cases I just edited the theme because I don’t want to deal with this shit. I’m never going to update it so screw it.
Setting Up an SSL cetificate
While setting up this website I was constantly greeted by this in my address bar:
I have no real reason for it to piss me off but it surely did. This must be remedied.
My hosting is different from my registrar/DNS so accomplishing it took a little more work than it might if you have all that stuff in one place. I use namecheap as my registrar/DNS and HostPapa for my hosting (mostly because I used to use Lunarpages and they got bought by HostPapa). I don’t necessarily recommend any of these services - I am lazy and interia accounts for a lot of why I’m with them, I’m just telling you where I’m coming from.
It Worked
Well hey look it worked! That’s pretty rad. I don’t have a lot to add to this, mostly this post is to make sure the script that I wrote to autobuild and commit to [GitHub](git commit -a –allow-empty-message) works =)