Skip to content

Instantly share code, notes, and snippets.

Peiran Guo anthann

  • Tencent
  • Canton, China
Block or report user

Report or block anthann

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@anthann
anthann / libcurl_demo.c
Last active Jan 22, 2019
Do `curl -X GET -I www.example.com` with liburl
View libcurl_demo.c
#include <stdlib.h>
#include <string.h>
#include "libcurl_demo.h"
struct string {
char *ptr;
size_t len;
};
@anthann
anthann / basic.swift
Last active Jan 9, 2019
[Swift] Codable
View basic.swift
/** 0x01 **/
struct Animal: Codable {
let name: String
let age: Int
}
let animal = Animal(name: "旺财", age: 1)
let jsonEncoder = JSONEncoder()
let jsonData = try jsonEncoder.encode(animal)
if let str = String(data: jsonData, encoding: .utf8) {
You can’t perform that action at this time.