An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
This gist aims to show you how to use KV datastore using Cloudflare pages. The reason I created this quick guide is it took | |
me almost 2 weeks to get it working, mainly because it is very new and the documentation is not up fully fleshed out yet | |
https://developers.cloudflare.com/workers/runtime-apis/kv | |
https://developers.cloudflare.com/pages/platform/functions | |
https://blog.cloudflare.com/wrangler-v2-beta/ | |
Steps: | |
Install wrangler 2 |
const waitFor = (ms) => new Promise(r => setTimeout(r, ms)) | |
const asyncForEach = async (array, callback) => { | |
for (let index = 0; index < array.length; index++) { | |
await callback(array[index], index, array) | |
} | |
} | |
const start = async () => { | |
await asyncForEach([1, 2, 3], async (num) => { | |
await waitFor(50) |
/* file:///Users/henryhuman/Documents/04_Business/Bootstrap%20Creative/GitHub%20repositories/bootstrap-classes-list/bootstrap4.5.0.html */ | |
.accordion | |
.active | |
.alert | |
.alert-danger | |
.alert-dark | |
.alert-dismissible | |
.alert-heading | |
.alert-info |
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
javascript: (function () { | |
function c() { | |
var e = document.createElement("link"); | |
e.setAttribute("type", "text/css"); | |
e.setAttribute("rel", "stylesheet"); | |
e.setAttribute("href", f); | |
e.setAttribute("class", l); | |
document.body.appendChild(e) | |
} | |
function h() { |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin