Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta name="author" content="HKLCF">
<title>Cloudflare API (List DNS record)</title>
</head>
<body>
<div id="result"></div>
@qrtt1
qrtt1 / GoogleApiUsage.md
Last active January 11, 2022 09:45
Note for learning google api for python (google api 的學習筆記)

由於 Google API 久久才會用一次,但它的文件對我來說實在是不好閱讀,應該花點時間把它筆記起來才是。

學習曲線分析

閱讀 Google API 使用文件,覺得難以閱讀的主要原因是它分成許多部分,每一部分不一定跟你要做的功能相關,而是在滿足你能使用 API 的基本條件。要攻略使用文件就必需清楚知道哪些是屬於「共通科目」、「必修科目」屬於任何產品的 API 使用前都必需滿足的。

內容分為下列主題:

  1. API 的設計哲學:Service Discovery (描述 API 的 API)
  2. API 開通與證認:API Console & OAuth 2
@pasela
pasela / unicodeescape.vim
Created December 17, 2011 19:30
Escape/Unescape unicode string.
" unicodeescape.vim - Escape/Unescape unicode string.
function! UnicodeEscapeString(str)
let oldenc = &encoding
set encoding=utf-8
let escaped = substitute(a:str, '[^[:alnum:][:blank:][:cntrl:][:graph:]]', '\=printf("\\u%04x", char2nr(submatch(0)))', 'g')
let &encoding = oldenc
return escaped
endfunction