Florida Republican Party…

According to WFLA, “Florida Sen. Jason Brodeur (R-Lake Mary) wants bloggers who write about Gov. Ron DeSantis, Attorney General Ashley Moody, and other members of the Florida executive cabinet or legislature to register with the state or face fines.” So I thought I would write about those folks.

The Ultimate Cancel Act

According to Tallahassee Democrat, “Sen. Blaise Ingoglia, R-Spring Hill … now seeks to … remove Democrats entirely from Florida politics.” That statement is a little overblown. Sen Ingoglia said, “Some people want to have uncomfortable conversations about certain subjects. Let’s have those conversations.” But it’s unlikely that any such “conversation” would be productive between the two parties.

“The Ultimate Cancel Act, … would decertify any political party that ever included a plank to support slavery in its platform, something the Democratic Party did between 1844 – 1864.”

Disney and DeSantis

According to The Guardian, “The Republican governor of Florida, Ron DeSantis, has signed a bill that wrests control of Walt Disney World’s self-governing district, in a move seen as punishing the company for its opposition to his so-called ‘don’t say gay’ law.”

Isn’t the Republican Party the party of small government, of few government regulations, big on business? This doesn’t seem like it…

Advertisement

How to Change Vim Colors – Highlights, Backgrounds, Foregrounds, etc.

I just spent quite a lot of time figuring out how to change popup background colors. I use coc.vim so I incorrectly thought coc was setting the color. Then I accidentally typed :hi and it displayed ALL my colors, and there discovered my Pmenu was set to magenta. I don’t know how it got set to that, but to change it all I had to add in my vimrc was highlight Pmenu guibg=#808080 or whatever color you want. You may need to set ctermfg, ctermbg, gui, guisp, or cterm depending on if you’re using the gui or not, and if you’re trying to set a foreground or a background.

Automatically Add Issue URL to Commit Message

I’ve spent too much time, twice, figuring this out, so I’m writing it here so future me won’t waste so much time. There are a lot of ways to do this, feel free to comment on your solution. I like my commit messages to contain the issue URL because 1) it tends to link the commit to the issue and vice versa in most git managers like github and gitlab 2) when searching git logs it makes it trivial to find the original issue.

We will be using a global gitmessage file and using a prepare-commit-msg hook. This assumes that your git branch will contain a group of digits which is the gitlab issue number. If your branch contains multiple groups of digits (jason/6456/description-stuff-343) then it assumes the first group of digits is the issue number

  1. Navigate to your project’s git hooks directory (ProjectDirectory/.git/hooks), and rename prepare-commit-msg.sample to prepare-commit-msg. By removing ‘sample’ you are telling git to actually use the file.

  2. Add this to your prepare-commit-msg. Note that this is for macOS, and if you’re using a different operating system your grep and sed commands might work differently.

# gets digits in current branch name. `head -1` gets just the first group. Note that this assumes you are adding your git issue numbers to your branches.

issueNumber=$(git symbolic-ref HEAD | grep -oE '\d+' | head -1)
# of course you need to change this URL to match your project's URL.
gitlabIssueURL="https:\/\/gitlab.com\/jasonmfry\/suchet-tts\/issues\/$issueNumber"

# if there's a digit in branch name
if [ -n "$issueNumber" ]; then
# replace #gitlabIssueURL with the value above
    sed -i '' -e "s/\#gitlabURL/$gitlabIssueURL/" "$1"

else
# delete the line containing #gitlabIssueURL
    sed -i '' -e "/\#gitlabURL/d" "$1"
fi
  1. Create a file (if you don’t have one already) named .gitmessage somewhere. Usually you should create it in your home directory, $HOME. Add #gitlabURL to wherever you want to add the url. Mine looks like this, to remind me how to make a decent commit message:
when applied, this commit will...

**Why:**

**How:**

Co-authored-by: username 

#gitlabURL
  1. Modify your global .gitconfig file, usually located in your home directory, $HOME, to add these two lines:
[commit]
    template = ~/.gitmessage

Putting all this together, whenever you do git commit, git runs the prepare-commit-msg hook, which will take your git message template (created in #3 above) and modify it with the fancy bash scripting we did in #2 above.

Job Hunting

There’s a Chuck Norris joke that goes, “Chuck Norris doesn’t go hunting because hunting implies failure. Chuck Norris goes killing.” I thought about titling this post “Job Killing” but that sounds terrible, so I stuck with “Job Hunting”. This post is going to be short, more like an outline of a post, but I hope it’s helpful and leads you to better places.

Continue reading

Fix Inconsistent JS Selenium Tests with element.isEnabled()

I’ve been writing automated regression tests at work over the past month, using Jest and Selenium WebDriver, and have really been struggling to get my tests to pass consistently. I began to suspect that methods like wait(until.elementIsVisible... and wait(until.elementTextIs... did not actually do what I expected since I was getting so many inconsistent failures. I began searching for a way to determine if an element is clickable with Selenium WebDriverJS. This is possible in other languages (I think Python and Java at least), but it’s not available for JavaScript. But it turns out you can make it work. Continue reading

Flask Mega-Tutorial: Converting OpenID to OAuth

With this blog post I hope to provide some help to those who are trying to combine Miguel Grinberg’s Flask Mega Tutorial with his other tutorial titled OAuth Authentication with Flask.  I have a repo that has a working version of his Mega Tutorial through chapter 5 that uses OAuth instead of OpenID.  You can find it here https://github.com/JasonMFry/Flask-Mega-Tutorial-With-OAuth  Continue reading

The ‘F’ Word: Failure

Looking back at my 3+ months in class at General Assembly, I did a lot of good work, I learned a ton about myself, about developing, about how to learn efficiently, I made good friends, and I networked my butt off.  But I also had some significant failures, which I’ll discuss in a future post.  But for now I want to talk about failure, and how to fail well.

Continue reading

My Fullstack Project with General Assembly

Once we finished our first project, we were immediately launched into learning the backend.  Since I had experience with JavaScript, functions, objects, and OOP, the frontend unit was a bit easier for me, but learning backend proved to be more difficult.  We moved at a furious pace (as always), and covered MongoDB, Express, and Node.js (they saved Angular for it’s own unit, Unit 3, which we’re currently in), passport, handlebars, and more in 2 short weeks.  Week 3 was project week.

Continue reading

My Frontend Project with General Assembly

Connect Four or Blackjack

After 3 short weeks of frontend (JavaScript, HTML, CSS, and jQuery), our instructors decided we were ready to strike out on our own and create something from scratch.  How kind of them :)  We had the choice between creating blackjack or connect four, and I chose connect four, mainly because I had already created a blackjack game and felt it would be dishonest to do that again. Continue reading