Lin's Blog
|
  • Zh-Tw
  • Ja
  • Posts
  • Categories
  • About

macOS: How to Show Keystrokes on Screen for Recording and Live Streaming

Online courses are very popular now, and many people record their courses as videos to share online. Whenever I record this kind of “computer tutorial video,” I always wonder how to show the keys you press. Sometimes you’re used to pressing Ctrl + C to copy a piece of text, but viewers can’t tell what you did when they watch the video. Some recording software can capture keystrokes too, by building a virtual keyboard into the recording whenever you press a key. But besides recording software itself, there are also apps that can display the keys you press directly on screen! Besides live streaming and online courses, it’s also very handy for in-person lectures and talks! ...

Hardware
#MacOS #Live Streaming
December 24, 2016 · 3 min

Homebrew - Error: Unknown command: cask

If you’re a Mac developer, you’re surely familiar with Homebrew, and you’ve probably used brew-cask to install apps. Today, when I tried to install a program with brew cask, I kept getting the error “Error: Unknown command: cask” every time I ran brew cask install xxx, even though I had confirmed that brew cask was installed successfully. After searching the issues, I learned that this seems to be a bug in an older version, which has since been fixed. ...

Software
#Homebrew #MacOS
December 23, 2016 · 1 min

How to Make a Dashboard on a TV

The TV hanging in our office has been sitting empty for a long time, and that is not a good use of it. So I recently started planning to show some important numbers on it, such as conversion rate, traffic, and live visitors. I originally thought a dashboard would be a simple request: two or three days of backend work to organize the data, then D3.js on the front end to draw the charts. Or I could make it even simpler and use custom reports in Google Analytics. But once I started researching, I found the problem was not so simple. Let me walk you through it. ...

SRE
#Dashboard #Monitoring
December 23, 2016 · 8 min

Stay Review: Light Hostel Tainan, a Budget Backpacker Hostel

I’d written down Light Hostel in my notebook a long time ago, and this trip to Tainan finally gave me a chance to stay there! I was a little wary of budget hostels run as businesses. I was afraid they’d be too commercial and lose the warmth a backpacker hostel should have, and that being so cheap would mean a lot of bad surprises. But Light Hostel completely exceeded my expectations and brought back my love for backpacker hostels! ...

Travel
#Tainan #Hostels
December 22, 2016 · 6 min

Roost Laptop Stand: Unboxing a Portable Laptop Stand

A while ago I got a real scare from a herniated disc. It made me look into how I use my computer, and I found that most of my posture had been wrong all along. This time it was caused by sitting for long periods, but sitting isn’t the only problem. Looking down at your phone, hunching over your laptop, or having your monitor at the wrong height can all lead to even harder-to-treat herniated discs in the neck! Laptops in particular: most people don’t notice that they use them with the wrong posture. Because laptops are small, using one on a desk means you have to hunch your head down, which puts stress on your neck. Using one for long periods can cause a herniated disc in the neck or other problems. Besides neck herniated discs, I’m sure you’ve also felt your shoulders and neck getting very uncomfortable while hunching over a laptop. In fact, all you need is a suitable laptop stand at a comfortable height, so you don’t have to look down at the screen. That helps a lot with these problems. ...

Hardware
#Laptops
December 20, 2016 · 5 min

String Split in Elasticsearch Script Field (Painless)

If you found this article, you have probably been searching for how to use Split in an Elasticsearch (or Kibana) Script Field for a long time! I deliberately included every keyword I could think of, so that engineers who suffer like I did do not waste too much of their lives on this… To cut to the chase: although Painless claims to support the Java Native API, a few things are not supported, and one of them is split. The story goes that the Elasticsearch developers felt the time complexity of split was too poor, so they cut it out. I did not know this at first, and I tried all kinds of approaches, from doubting whether my syntax was correct to wondering whether some special syntax was needed to import the Java API. Finally, on an Elasticsearch Issue, I found this post: [Painless - Request for native String split function], and my feelings at that moment were…… ...

Programming
#Elasticsearch
December 14, 2016 · 2 min

Quickly Moving the Cursor in Terminal on macOS

Since I’m really sleepy, let’s keep it simple and share something small today! Whenever I use vim or Terminal and run into a super long command, I find it annoying to press the arrow keys forever just to get to the position I want. Today I’ll share three ways to quickly move the cursor to a specific spot. ...

Hardware
#MacOS
December 14, 2016 · 2 min

Python Join with Lambda - A More Customizable Join

If you write code, you’re surely familiar with split() and join(). In Python, you can use String.join(list) to merge a List into a string. For example, “,".join([“A”, “B”, “C”]) returns the string “A,B,C”. Going the other way, “A,B,C”.split(”,") splits it into a List. But have you ever run into needs like these that you couldn’t solve? Joining strings while capitalizing the first letter of each one The List holds numbers, but join needs strings to work with them These problems can be solved with List Comprehension. For example, the type conversion part can be written like this: nums = [1,2,3,4,5] nums_str = [str(num) for num in nums] print(",".join(nums_str)) But are there other solutions besides List Comprehension? I bet you've also thought about passing a lambda function to join, the way you can with sort!...

Programming
#Python
December 13, 2016 · 2 min

Laravel Artisan Migrate "Table Already Exists" or "Foreign Key" Error

While deploying a project I had developed half a year earlier with Laravel 5.2, I ran into quite a few problems. One of them: after running php artisan migrate, I got a “Table Already Exists” error. But I had never created that table before. Digging deeper, I found that the table did exist, but there was no record for it in the project_migrations table. So I deleted the table manually and ran php artisan migrate once more. Sure enough, this time the real error message appeared: “General error: 1005 Can’t create table ‘dbname.#sql-fbc1_15e6’ (errno: 121) (SQL: alter table karl_project add constraint project_user_id_foreign foreign key (user_id) references karl_user (id))” ...

Programming
#PHP #Laravel
December 12, 2016 · 2 min

Get File MD5, SHA1 Checksum on Mac OS

On Windows, I was used to installing a separate program for everything: one to view images, one to browse PDFs, and another to calculate a file’s MD5 or SHA1. On Mac OS X, you don’t have to go through all that trouble! If you want to calculate the MD5 or SHA1 checksum of a file, there is a built-in tool for it. ...

Hardware
#MacOS #MD5
December 11, 2016 · 2 min
« Prev  Next 

Categories

All Programming AI SRE Life Hardware Software Blog Travel Web Apps Games Security
© 2026 Lin's Blog · Powered by Hugo & PaperMod