Title photo
frugal technology, simple living and guerrilla large-appliance repair

Regular blog here, 'microblog' there

Many of my traditional blog post live on this site, but a great majority of my social-style posts can be found on my much-busier microbloging site at updates.passthejoe.net. It's busier because my BlogPoster "microblogging" script generates short, Twitter-style posts from the Linux or Windows (or anywhere you can run Ruby with too many Gems) command line, uploads them to the web server and send them out on my Twitter and Mastodon feeds.

I used to post to this blog via scripts and Unix/Linux utilities (curl and Unison) that helped me mirror the files locally and on the server. Since this site recently moved hosts, none of that is set up. I'm just using SFTP and SSH to write posts and manage the site.

Disqus comments are not live just yet because I'm not sure about what I'm going to do for the domain on this site. I'll probably restore the old domain at first just to have some continuity, but for now I like using the "free" domain from this site's new host, NearlyFreeSpeech.net.

Sun, 12 Nov 2017

'Big Little Lies': Best thing on TV in months

I've been watching the seven-episode "Big Little Lies," starring Reese Witherspoon, Nicole Kidman, Shailene Woodley and Laura Dern, which is written by 1990s TV powerhouse David E. Kelley, and it's probably the best thing I've seen on TV in the past six months or year.

Not that the competition is all that stiff. "This Is Us" is not my thing. "Victoria" is good but not great. I did like "I Love Dick," but HBO's "Big Little Lies" is better. It's also better than the most recent season of "Orange Is the New Black" (which improved with its ground-breaking pacing). "Transparent" is flagging. I really like "Casual," but "Big Little Lies" is better.

"You're the Worst"? Also running on fumes. "Love" from Netflix? Not as good.

"Poldark" is great, but "Big Little Lies" is still better.

So now that I've done super-mini reviews of every show I've watched in the past year, I can tell you that we're just starting the final episode of the seven-installment "Big Little Lies," and in terms of writing, acting and directing, this is the best that television has to offer.

Sat, 11 Nov 2017

I have a "now" category

When my Blog Poster script isn't posting a "social" entry, it drops the files in the "now" directory/category. I figured that "now" was a good a way as any to describe these quick posts that aren't meant as direct social media posts. They go to Twitter as a "normal" blog post, with title and link (instead of post body with no title or link).

Why can Ruby call Vim in read/write mode in Linux but read-only in Windows?

Why does Ruby's system call to vim allow me to write a file sometimes but not other? I can write all files in Windows with Notepad, and all files with vim in Linux.

Update: Now I seem to be having no problem using Vim for read/write. Maybe my last change (removing routine that read from a text file) fixed this bug, too.

Thu, 09 Nov 2017

Overcoming a permission error while using Ruby to move files

I'm not sure if this is a Windows-specific problem (I am currently developing on Windows 10), but part of the Ruby script in my Blog Poster app allows the user to "archive" all of the text files created as blog/social posts by moving them from the main program directory to an archives directory. I could opt not to create files at all, or have the script continue to overwrite the same one for each post.

But for now I'm keeping all of the text files (which the script creates and names based on the <title> tag of URLs that are part of the post, and I have an option to move those text files to the archive directory:

Dir.glob("*.txt") {|f| FileUtils.move File.expand_path(f), "archive" }

This part of the Ruby script worked fine when I started it and was doing nothing else, but if I used it to create one or more files, invoking the "archive" feature would error out and kill the script, saying that there was a permission issue.

Laziness. I looked in Stack Overflow and found the solution, which consisted of adding :force => true to the expression:

Dir.glob("*.txt") {|f| FileUtils.move File.expand_path(f), "archive", :force => true }

Now I can create posts (and their matching .txt files, which my blog uses) and then archive them at any point without the permission error killing the script. Thanks, Stack Overflow user mudasobwa.

Update: This modification allowed the script to keep running, but any files created during the current session are NOT moved to the archive directory.

The reason the files created during the session were not deletable is due to the script reading them out in the console. I will figure out a way to provide this output without rendering the files "undeletable" via Ruby.

Here are the lines I am removing for now:

puts "This is your file:\n\n"
File.open( @yourFileName ).each do |line|
   puts line
Tue, 07 Nov 2017

Squarespace can be your online store and website

When Dan Benjamin mentioned that his Unwound watch podcast co-host Seth Roberts' website for his Hub City Vintage business is now running on Squarespace, a bell went off for me.

Not that there's anything wrong with Shopify, but it's nice to know that there's an alternative for the small (or maybe not-so-small) business to both have a website and offer fully integrated e-commerce for a reasonable monthly fee and without a lot of development cost and hassles.

Many say Shopify is a better choice, but if you want to keep it simple, Squarespace is a viable option.

Sat, 04 Nov 2017

Top 8 Van Halen songs

The top 8 Van Halen songs:

  1. (tie) Runnin' With the Devil
  2. (tie) Jump
  3. You Really Got Me
  4. Ain't Talking 'Bout Love
  5. Panama
  6. Dance the Night Away
  7. Hot for Teacher
  8. Beautiful Girls