TALK IS CHEAP, SHOW ME THE CODE.

What is the CLR? What is metadata? What is the JIT? How does the CLR work?

This post takes a fairly deep dive into the first three chapters of CLR via C#.

Read More

In my spare time recently I played around with msf and BadUSB, and pulled off plugging in a “USB stick” to hack into a Windows 10 machine.

Read More

Note

The server behind the API in this post was shut down long ago, so the addresses in the code no longer work and are kept for the record. The Followers / Stars badges shown on this page now use shields.io’s built-in GitHub badges; there is no ready-made replacement for the per-user Forks badge, so it was removed.

Last time we built an API for bilibili follower counts, plugged it into Shields.io, and got it displaying. This time we’re building one for GitHub! Here’s what it looks like:

Read More

Note

The server behind the API in this post was shut down long ago, so the addresses in the code no longer work and are kept for the record. The follower badges shown on this page now read Bilibili’s official API directly: https://api.bilibili.com/x/relation/stat?vmid=<uid> (JSON key $.data.follower).

Subsats is still painfully slow. My guess is the author scrapes everything with Selenium. Why use Selenium when plain requests would do? So I decided to build a similar API service myself. I’ve already finished the service for getting bilibili follower counts. Check out the loading speed comparison (only the first load really counts; after that things may be cached and there’s no point comparing. The left one uses my own API, the right one uses Subsats):

Read More

Note

Substats can no longer fetch Bilibili data (the badges show 0). The badges displayed on this page now use Bilibili’s official API, https://api.bilibili.com/x/relation/stat?vmid=<uid> (JSON key $.data.follower); the NetEase Cloud Music badge now uses NetEase’s user API; the other parameters work the same. The code keeps the original URLs.

When using online code hosting services like GitHub, have you often seen little badges like these?

Want badges of your own?

Or maybe you’d like badges that update dynamically? (Doesn’t matter if you don’t have many followers yet, maybe you’ll have more someday ^_^)

This post shows you how to make badges like these and display them on a web page!

Read More

The Command Pattern is one of the design patterns you run into all the time in game development: key binding settings, AI command streams, undo and redo, and so on all use it. In this post I’ll explain how the Command Pattern works and how to apply it in Unity.

Read More

Want to set up your own API service quickly? This post shows you the simplest and fastest way to do it with Python!

Read More

This post shows you how to apply status checking with Poll and multiplexing with Select in Echo.

Read More

Note

This post was written on 2020-10-25 and no longer matches the current setup; it is kept for the record. For the latest, see Reviving My Old Blog with Hugo.

Coding Pages deploys incredibly slowly and the site takes forever to update, which was really disappointing. In the end I decided to host my blog on an Alibaba Cloud server instead. This post walks through in detail how to host a Hexo static blog on an Alibaba Cloud server (Ubuntu 20.04).

Read More

How do online games communicate? This post shows you how to implement the simplest possible network communication with the simplest TCP/IP sockets.

Read More
TOP