Skip to content

Instantly share code, notes, and snippets.

View ttyS0's full-sized avatar
😴
tired

ttyS0 ttyS0

😴
tired
View GitHub Profile
const API_SYNC_OPENID = 'https://yourapi.example.com/sync_openid';
const ACTIVE_SIGN = 'https://v18.teachermate.cn/wechat-api/v1/class-attendance/active_signs';
const success = window.location.search.match(/success=([^&]*)/)[1] == '1';
const openId = window.location.search.match(/openid=([^&]*)/)[1];
setTimeout(() => {
fetch(API_SYNC_OPENID, {
method: 'POST',
headers,
body: JSON.stringify({ openid: openId })

Keybase proof

I hereby claim:

  • I am siger-yeung on github.
  • I am sigeryeung (https://keybase.io/sigeryeung) on keybase.
  • I have a public key whose fingerprint is 652F 945F 3F30 D7CD 1C0B 9A3F 0A0B 8E4C 446E 5252

To claim this, I am signing this object:

@ttyS0
ttyS0 / vrrp_checksum.c
Created September 20, 2022 13:14
VRRP Checksum Test
#include <stdio.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
// https://github.com/FRRouting/frr/blob/master/lib/checksum.c