27 Apr 2017, 13:33

working from home

13:33 Thursday 27 April 2017 JST

Now I am working from home, hoping to get test AB talking to test FS behind a load balancer and cdn.

27 Apr 2017, 13:28

integration group

13:28 Thursday 27 April 2017 JST

Good meeting today, including comfortable silence.

26 Apr 2017, 22:59

lessons

22:59 Wednesday 26 April 2017 JST

Today’s first three lessons went really well by simply having a four part target per lesson: questions, text, test, game. Thanks, Yuji!

I did a gamification of the questions portion of the lessons. For question correctly answered within about five seconds, the student received a “prize” (single card from Stacker Crackers). The cards give them something to fiddle with while other students are answering questions, and hopefully inspires them to answer correctly.

For the 6-year-olds, I focused on three questions: “How are you?” “How old are you?” and “What’s your name?” all spoken at native speeds. They had about 85 to 90% accuracy on distinguishing the first two questions. 100% answering the third question, but I kept it in there due to its prevalence.

Today’s last two lessons went well, though I was tired. Focused on cadence and intonation for the last part of the first of those two classes.

26 Apr 2017, 12:03

Got fake FS working on new server

12:03 Wednesday 26 April 2017 JST

Nice. Now that I’ve got a few Ansible playbooks set up (thanks, Travis!), it’s sorta kinda easy to spin up a new server with all its personalized packages, bells, and whistles.

Today I got FS set up on a temporary server, including pulling a copy of the DB and static files from the live server.

Basically, I need to split the live server into two: one that we can give to CB and one that we continue to use for AB.

25 Apr 2017, 12:53

oops and whew

12:53 Tuesday 25 April 2017 JST

I left the AB DB backup process in testing mode (backup every hour, do not clean up the files) and it killed the disk this morning and locked up the server.

Thankfully, I was able to request support from AWS. They called me immediately and helped me dismount the flooded disk, remount it at /mnt on a different server where I was able to clean up the disk, then remount it on AB server and get the server running again.

As a result of some part of that process, the mysql server got a sad and corrupted a DB table. So then the mysql server could not write to that table. Thank goodness AB noticed the problem quickly and I was able to rebuild the table to get it working again.

Now I just need to copy 14 records from the mysql log to the table in question, and everything will be as I hoped it would be this morning at 9am when I hoped to start working on a different project.

25 Apr 2017, 08:32

bash one liner

08:32 Tuesday 25 April 2017 JST

I sent this to Fred yesterday:

I often type `gits` to get the status of git.

There is one directory on my filesystem that has a filename
starting with 0x0x which I must not commit to git, but I need to
see each time I get git status.

I wrote this

    alias gits='git status; if [[ -f 0x0x* ]]; then echo; ls -1 0x0x*; fi'

And it works to *not* complain if there is no 0x0x* file, but does
not show the file if it is present.

The problem is prolly small; can you fix this with just an alias?

Fred sorted it out last night. I replied inline:

alias gits=‘git status; if test -n “$(find . -maxdepth 1 -name 0x0x* -print -quit)“; then echo; ls -1 0x0x*; fi’

Sweet! It works well.

Escape the * the first time, but not the second time.

because the first one is in the $() ?

A couple gotchas that were emerging with your solution is that if there is more than one match, the -f won’t work. Maybe right now you never have that, but let’s fix it while we’re here.

Definitely going to be more than one, so thank you for solving it! In fact, if the ls at the end could ignore files ending with ~, that would be great.

We can set ‘shopt -s nullglob’ which “allows patterns which match no files (see Pathname Expansion above) to expand to a null string, rather than themselves.” But that’s a bash-wide thing that might bleed into your regular commands, so that’s too risky.

yeah that sounds spooky.

I thought of writing it as a command, instead of an alias, where we can take the time to do a lot of checking and shit, instead of being short and sweet. Then I tried some other dumb ideas that I’ve already forgotten now, and finally decided to hit stackoverflow, with what appeared to be the main issue: we need only to know if the glob matches, not what the match is, or how many there are. So I googled “bash if glob matches”

There are a few good solutions, and a good explanation of why each is useful here:

https://stackoverflow.com/questions/2937407/test-whether-a-glob-has-any-matches-in-bash

The one you want is probably

if test -n "$(find . -maxdepth 1 -name 'glob*' -print -quit)"
then
    echo found
else
    echo not found
fi

for portability, and familiarity with tools you already know.

Yay for tools I already know!

To put that solution in an alias, the quoting is awkward. The glob is already nested inside “, ‘, and $(. The alias command wants another nesting, and I’m out of quotes. So I removed the quotes around the glob and escaped it instead. That worked. (Escaping the quotes didn’t for some reason.)

Write a new RFC to allow 「 」as quotes in bash!

So, your solution is as at the top.

Yahoooo, as is my thanks! Thanks for putting it at the top, cause I gotta get back to work!

24 Apr 2017, 23:11

Jennie J!

23:11 Monday 24 April 2017 JST

Got to chat with Jennie J today! She’s working overseas, and I miss her so much! We may have a chance to chat more soon?

I sent her a video

https://www.youtube.com/watch?v=48Fgrt1dUHk

Will Hugo expand that link to embed the video? Hopefully!

24 Apr 2017, 10:05

work

10:05 Monday 24 April 2017 JST

Today I hope to get AB server upgrade officially complete. Need to clarify a time with client and then do it, hopin’ all goes smoothly (i.e. I have not missed anything).

23 Apr 2017, 22:01

bitching

22:01 Sunday 23 April 2017 JST

Moe Joe

Lin is bitching at her mom. In me it’s triggering anger. I just want to yell SHUT THE FUCK UP GODDAMMIT because with them bitching I can’t work, nor sleep.

I know this reaction is my problem. I am going to sit (and meditate) a bit.

09:46 Monday 24 April 2017 JST

Meditation worked wonders. My feelings shifted from “fuck you” to understanding that they have needed to get this fight out for a long time. I gave Lin hugs and kisses when she finally came upstairs. They fought for over an hour.. must have been tiring! She said they came to a good understanding, though.

15 Apr 2017, 12:42

slowly

12:42 Saturday 15 April 2017 JST

Man this is going slowly. Part of it is pain in my neck, wrists, head, fingers..