Skip to main content

· One min read
Ang Xuan Ze

Introduction

So in the AffiliateManager project, a lot of endpoints are being cached. And somehow for some reason, the past me decided that a TTL of 0 is fine. And that left with me with a redis fill with thousands of keys :(

Now, time to purge it!

But I want to keep some of them, like session tokens but will like to clear those that are related to id etc.

So here's how...

· 5 min read
Ang Xuan Ze

Introduction

Executing a SQL query using gorm is pretty trivial. Normally this is what I'd do:

  1. Write a proto struct that matches the DB table schema
  2. Run query using gorm and Scan into the struct
var auditDb *pb.DataInjectionAuditLogDb
if err := orm.DataHelperDbInstance(g.c).Raw(q).Scan(&auditDb).Error; err != nil {
hlog.CtxErrorf(g.c, err.Error())
return nil, err
}
  1. Done

However, what if we do not know the schema, or it is virtually impossible to create a struct for all of them?

Huh?!

· 2 min read
Ang Xuan Ze

Introduction

Mac OSX 13 Ventura is finally released and available for update. But did it mess things up..?

What Happened

After updating, everything seems perfect, and to be honest there aren't any noticable changes to the overall experience. No news is good news. However, the first abnormality appears when I wanted to push some stuff.

git-permission-denied-osx-ventura-1

Hmmm... nothing was changed tho...

· 2 min read
Ang Xuan Ze

Introduction

If you want to host some ever-running script, what option do you have?

  1. Run on your laptop, and never sleep / off it (??)
  2. Get a Raspberry Pi (ugh.. overkill)
  3. Pay a few dollars to host it somewhere (few dollars to host something so small.. worth?)
  4. Ask your friend to run on his/her laptop and never off it.

Option 4 seems to be the best option if you manage to convince.

Fortunately I have the opportunity of abusing my personal VM at work. I mean, not abusing, it's somewhat related to work too. I'm sure.

· One min read
Ang Xuan Ze

Introduction

So when I was building this school project, I encountered a requirement to write soem data into local files.

Basically, these are so called temporary files or caches, folders are created during runtime.

Sounds straight forward enough, what's the problem here?

· One min read
Ang Xuan Ze

MatrixPort

Introduction

Matrixport is a very promosing SG company with a fresh $100M funding from Series-C last year. And they also have plans to go public in the next few years. The exchange under MatrixPort is called bit.com. However, note that all interviews were conducted in Chinese.

TLDR

Overall Experience: Good
Difficulty: Medium -> Medium-Hard
Received Offer: No

· 2 min read
Ang Xuan Ze

TikTok

Introduction

TikTok has been the most popular choice among ex-colleagues that left Shopee. A quick check on LinkedIn Jobs also shows that they are hiring very aggressively (STILL). The role isn't that bad too, so why not give it a try.

TLDR

Overall Experience: Very Good, very friendly interviewers
Difficulty: Easy
Received Offer: Yes

· One min read
Ang Xuan Ze

Introduction

What the hell am I talking about? You might say. Well yea it sounded crazy but how long is a second exactly?!

What Happened

As I was writing some unit tests for my shiny Redis Set implementation, somethign weird caught my attention.

TestSendPotentialUsers | Successful | Written 80687641:-18230398344540846 to potential_user set

Excuse me?