Skip to content

Instantly share code, notes, and snippets.

View jht5945's full-sized avatar
👣
Learning Rust, Dart and Go ...

Hatter Jiang jht5945

👣
Learning Rust, Dart and Go ...
View GitHub Profile
// refer:
// http://zh.wikibooks.org/wiki/Unicode/20000-20FFF
// http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
// https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-upgrading.html
mysql> create table test_x (value varchar(100)) default character set utf8mb4;
Query OK, 0 rows affected (0.04 sec)
mysql> insert into test_x values('𠀳');
Query OK, 1 rows affected, 1 warnings (0.01 sec)
@jht5945
jht5945 / gist:db4389d068a96c40ea6b
Created September 10, 2014 14:36
phishing issue
// jh***@gmail.com is my email address.
Delivered-To: jh***@gmail.com
Received: by 10.182.48.200 with SMTP id o8csp41105obn;
Fri, 5 Sep 2014 05:35:11 -0700 (PDT)
X-Received: by 10.152.21.168 with SMTP id w8mr11470156lae.53.1409920510262;
Fri, 05 Sep 2014 05:35:10 -0700 (PDT)
Return-Path: <boris0968@gagarin.timeweb.ru>
Received: from gagarin.timeweb.ru (gagarin.timeweb.ru. [92.53.96.221])
by mx.google.com with ESMTPS id rn2si2846435lbc.37.2014.09.05.05.35.07
for <jh***@gmail.com>
@jht5945
jht5945 / googleauth.go
Created July 19, 2015 10:05
TOTP in Go Lang implemention
package googleauth
/*
Use sample:
challenge := googleauth.GetChallenge()
currPasscode, err := googleauth.GenerateResponseCode(secret, challenge) // current passcode
nextPasscode, err := googleauth.GenerateResponseCode(secret, challenge + 1) // next passcode
*/
import (

Simple Security Guidelines

  • Use an iDevice

    • Use an iPod or an iPad without a SIM card
    • Use an iPhone
    • Do not jailbreak
    • Always upgrade to new iOS versions
  • Use Signal (iOS + Android)

@jht5945
jht5945 / keybase.md
Created December 31, 2023 08:08
keybase.md

Keybase proof

I hereby claim:

  • I am jht5945 on github.
  • I am hatter (https://keybase.io/hatter) on keybase.
  • I have a public key whose fingerprint is 6FAF C0E0 1709 85AA 7154 5483 C794 B164 6A88 6CD6

To claim this, I am signing this object: