Skip to content

Instantly share code, notes, and snippets.

View harishphk's full-sized avatar
🔭
Exploring

Harish Kumar harishphk

🔭
Exploring
View GitHub Profile
@harishphk
harishphk / cloudflare-worker.js
Created October 25, 2020 17:35
Use cloudflare as a proxy for your API
async function handleRequest(request) {
const init = {
headers: {
'content-type': 'application/json;charset=UTF-8',
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET'
},
}
const { searchParams } = new URL(request.url)

Vim Commands

Files

  • vi filename.txt - Open a file
  • : - Enter Command Mode
  • u - Undo changes
  • ctrl+u - Redo Changes
  • :q - Quit Vim
  • :q! - Force quit vim without saving