Alvin Alexander | Java, Scala, Unix, Perl, Mac OS X
“So you’re a glass half-empty kind of guy?”
“Depends what’s in the glass.”
“If you care about someone you have to let them be the person they are, not the person you want them to be. Otherwise, what’s the point?”
(From an episode of “Death in Paradise.”)
One of the crazy things about having super-realistic lucid dreams goes like this:
Three times this morning I woke up, had a couple of cookies, made some coffee, and started doing things, only to realize each time that I was still asleep.
(The good news is that I had a lot of cookies, with no calories.)
Table of Contents
- New Linode Server
- Update Everything
- Ubuntu Firewall
- Add a New User
- Disabling Root Login
- Limit Login Attempts
- Install Nginx
- Adjust Firewall
- Nginx Configuration
- Not what I used: Let’s Encrypt on Ubuntu 16.04
- (1) Create a cert (openssl)
- (2) Create a strong Diffie-Hellman group
- (3) Configure Nginx to Use SSL
- Adjust the Nginx Configuration to Use SSL
- (Alternative Configuration) Allow Both HTTP and HTTPS Traffic
- Adjust the Firewall
- Enable the Changes in Nginx
- Test in Browser
- Nginx "default_server"
- Can change to a permanent redirect (301)
- More Security: Preventing Information Disclosure
- More Security: Fail2Ban
- Restricting Access by IP Address
- See also
Without any introduction or discussion, here are the notes I made while learning how to get HTTPS working with Nginx. These are just for me, but if something helps you, cool.
Wesley Reisz also shared this image with the text, “Artist’s secret toolbox for creating art ... transformations.” The slide is from Brian Kane.
Wesley Reisz shared this nice image titled, “The Rationale for Optional” (in Java).
Optional in Java is similar to
Option in Scala.
I was surprised to find out yesterday that you can change your Amazon email address without having to verify the change from your old email account. You only have to verify the new email address. That seems like a flaw.
I sit here on the stairs,
'cause I’d rather be alone.
If I can’t have you right now,
I’ll wait dear.
A. Rose, Patience
ExtremeTech.com has this story about newly restored nuclear test footage. From the article, “Lawrence Livermore National Laboratory (LLNL) is in the process of restoring those films, and they’ve uploaded the first batch to YouTube.”
“NASA’s Curiosity rover usually keeps its instruments firmly focused on Mars’s ground, zapping grit with its laser or drilling cores in bedrock. But every few days, the SUV-sized robot, like any good dreamer, shifts its sights upward to the clouds. Well into its fifth year, the rover has now shot more than 500 movies of the clouds above it, including the first ground-based view of martian clouds shaped by gravity waves ...”
(See the story for more information, and some animations which unfortunately just keep endlessly repeating.)
When I first moved to Talkeetna, I sat down to sign the lease with my new landlord. The conversation went like this:
Her: So, why are you moving to Alaska ... hunter?
Right-wing nut job?
You’re not here to write stories about the town for tv shows, like those Northern Exposure people, are you?
*she starts taking off her shirt, which I eventually realize is so that she can breast-feed her baby*
Um ... no.
Why are you here?
A little personal enlightenment (from March 22, 2014):
Since I started passing out a few weeks ago, I’ve had conversations with doctors, nurses, friends, and even a shaman caregiver about life, death, quality of life, goals, and desires. I had a hard time answering some of those questions, and yesterday I realized why that was:
If you’re truly living in the present moment, those questions don’t make any sense! You can’t think about life, death, the past, or the future if you’re absorbed in the present moment.
When eating, just eat. When planning for the future, live fully in that moment of planning for the future. And when writing text like this, just write. That’s all.
Back in 2005 I used to walk over to a bar that was across the street from my apartment. One night I was talking to a waitress and wondered out loud whether I would be happier working a job that I enjoyed that might only pay $30K to $40K per year — as opposed to my current job, which paid a lot more but definitely wasn’t making me happy.
She wisely said, “Don’t look at me honey, I don’t make that kind of money,” then turned and walked away.
Here’s a nice 2009 article where Bill Venners interviews Martin Oderksy about the origins of Scala.
“Your purpose in life is to find your purpose and give your whole heart and soul to it.” ~ Buddha
Growing up, I used to envy those people who seemed to be shot out of the womb with a purpose, like they always knew what they wanted to do. But these days I think there’s a great reward in the struggle to find that purpose.
(I seriously doubt that the Buddha actually said that, but hey, it sounds impressive, whoever said it.)
Summary: This blog post shows one way to drop/filter the first matching element from a Scala sequence (Seq, List, Vector, Array, etc.). I don’t claim that the algorithm is efficient, but it does work.
While creating some Scala test code earlier today I had an immutable list of toppings for a pizza, and I got into a situation where I wanted to remove the first instance of a topping.
On the drive back from Vegas this weekend, the road got icy in the mountains near Vail, so I decided I better pull off and stay at a hotel, or sleep in the car if necessary. I wasn’t happy about it. Even though it was after 2am, I was jacked up on Mountain Dew, and just wanted to finish the last ninety miles to get home.
I got off the interstate at the next exit. The roads were nasty slick, and I slid around the dark collection of motels and gas stations until I saw a skanky motel whose “Vacancy” sign was lit. My car couldn’t make it up the motel’s hilly entrance, so I parked in an open flat area below, grabbed a bag, and walked five minutes in the freezing precipitation to get to the motel entrance, finding footing anywhere I could.
One thing I’ve learned lately is that I don’t like it when people post things to my Facebook timeline, like, “You should like this!” I’m about one “bad attitude day” away from cutting my Facebook friends list down to just immediate family. #argh