Skip to content

Instantly share code, notes, and snippets.

@coder054
coder054 / vimrc
Created May 23, 2022 04:08 — forked from Apsu/vimrc
Colemak DHm vim remap
noremap f e
noremap p r
noremap b t
noremap j y
noremap l u
noremap u i
noremap y o
noremap ' p
noremap r s
noremap s d
type TemplateType = {
template: string;
id: string;
};
function withTemplate(templateObj: TemplateType) {
return function (constructor: any) {
let el = document.getElementById(templateObj.id);
let p = new constructor();
if (el) {
// send POST request to /wp-json/jwt-auth/v1/token voi data
{
"username" : "admin",
"password": "123456"
}
// ket qua nhan ve se gom truong token