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

Detention Good and Bad Endings Guide

If you’re playing Detention for the first time, I recommend you stop reading here. The well-known computer game Detention actually has two endings. If you, like me, have tried twice and still gotten the bad ending, why not peek at this secret and learn how to reach the other ending? In Chapter 4, Fang Ruixin talks with her double, and the double gives you options to answer. No matter which one you choose, the game keeps going. The only difference is how it ends. ...

Games
#Detention #Walkthrough
February 10, 2017 · 3 min

Novel Things I Saw in Japan

Last year around this time, a few friends and I went to Japan, where we came across many interesting and practical things. In this post I’ll briefly share them. They’re worth a look, and they’re worth reflecting on: why doesn’t Taiwan have them? ...

Travel
#Japan
February 9, 2017 · 3 min

Handling File Uploads on the Frontend With JS: Preview, Size, Dimensions, and Format

What I hate most when uploading a file is being told five minutes later that the file is too big or the dimensions are wrong! We usually leave upload validation to the backend, so a file has to be uploaded before we can check whether it meets the requirements. Images in particular also need their aspect ratio checked. If all of this is left entirely to the backend, the user experience can suffer. When I was researching profile picture uploads at NewTalk, I found that all of this can actually be handled on the frontend. With JS and HTML5 APIs, you can check the file’s format, size (20MB), and dimensions (100x100). You can even do previews and client-side image cropping and conversion! ...

Programming
#JavaScript #HTML
February 9, 2017 · 3 min

Handling Insufficient Balance for GCP Automatic Payments

Because the credit card I registered with GCP is a “VISA debit card,” the automatic monthly payment can sometimes fail when my bank balance is too low. GCP’s current approach is to send an email reminder after a failed charge and retry the charge one day later. If it still fails, GCP asks you to log in to the GCP console and pay manually once you’ve fixed the problem. I had never had trouble paying through the GCP console before, but this time the flow seems to have changed. Following their link takes you to the billing page, but you can’t actually make a payment there. Even when you find the right payment button, using Chrome Canary causes a frontend problem where the payment dialog keeps loading forever. You have to switch to the regular version of Chrome to pay successfully. I’m really curious what the latest and greatest technology behind this payment dialog is… ...

SRE
#GCP
February 7, 2017 · 2 min

The Art of Naming in Programming

Naming is an old, familiar topic in programming. From variable names to function and object names, not many people get it right. Do you really understand why variable names matter? Beyond making sure basic variable names are meaningful, how should you choose between common naming styles like Hungarian notation and camelCase? Here I’ll briefly share some of my thoughts on variable naming. ...

Programming
#Coding
February 6, 2017 · 4 min

How to Use Web Inspector on iOS Safari

When doing front-end development on a computer, browsers provide handy developer tools that let us check error messages, storage contents, step through JS, and more. But how can we open these powerful developer tools when testing a web page on a mobile device? After all, you cannot fit them on a tiny screen! This article shares how, for iOS devices, you can connect to a Mac and use Mac Safari’s developer tools to remotely control the web page running in iOS Safari, which makes testing on iOS much easier. ...

Programming
#IOS #Safari
February 3, 2017 · 2 min

iOS Packet Sniffer on macOS

When developing iOS apps, or when doing things you’d rather keep under wraps, you may need to capture packets. For capturing packets on a computer, Wireshark is the top choice. But what if you want to capture packets on your iOS device (iPhone, iPad)? You could set up a proxy and have the iOS device connect through it, or jailbreak and run tcpdump on the device. But both approaches are too troublesome. Here I recommend the rvictl command included in the Xcode Command Line Tools. It requires no complicated setup or jailbreak, and with just one command you can capture packets on your computer using any software. ...

Security
#Packet Capture #IOS #MacOS
February 2, 2017 · 2 min

When GitLab Deleted Its Database by Mistake, How Do We Keep the rm Command Under Control?

We have all heard the story of someone accidentally deleting the root directory as a joke, but don’t think it is just a joke! I have personally seen countless friends’ computers suffer this kind of disaster. Today, the engineers at GitLab (a service similar to GitHub) also demonstrated the immense power of the rm -rf command… They wiped out the database on the production server… I always thought this kind of disaster would never happen to me, but now even a service like GitLab, which has tens of thousands of users, has had it happen through carelessness. That made me look into how to prevent it, so let’s talk about how to keep the rm command under control! ...

SRE
#GitLab #Linux
February 1, 2017 · 4 min

UptimeRobot - Website Uptime Monitoring Service

UptimeRobot is a long-established, stable, and full-featured website status monitoring service. Once you set it up, UptimeRobot periodically checks whether your site is online. This matters a great deal to site owners. Imagine you update your server and the site breaks, and you only notice three hours later. All the visitors during those three hours are lost! The free plan of UptimeRobot lets you monitor up to 50 targets, checking each one every five minutes. It supports four check types: HTTP Status, Keyword, Ping, and Port. When something goes wrong, UptimeRobot can notify you by SMS, email, Slack, WebHook, and many other channels. What matters even more to me is that UptimeRobot is well run and stable. I have been using it since 2011. ...

SRE
#Monitoring
January 31, 2017 · 2 min

Lessons in E-commerce Flow Optimization from My Shopping Experience at udn Books

Perhaps because of the pressure from Amazon’s e-books, Taiwanese publishers have become more willing in recent years to offer e-book purchase options. A few days ago I wanted to read Zheng Feng’s Chronicles of Strange Peaks and Stones, and I found that udn Books actually sells the e-book. Although you have to bind it to udn’s own app, and the files can’t be downloaded (Kobo offers an EPUB with DRM download), at least I could read it at home at my leisure. Who knew that after I pressed the buy button I would run into so many problems? I’d like to take this chance to share them. ...

Blog
#UX #E-Commerce
January 30, 2017 · 13 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