Skip to content

Instantly share code, notes, and snippets.

View chechedotmx's full-sized avatar
:shipit:
Codeando Ando

Sergio López chechedotmx

:shipit:
Codeando Ando
View GitHub Profile
@mayneyao
mayneyao / notion2blog.js
Last active February 29, 2024 18:01
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "agodrich.com"
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2"
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
@fabdbt
fabdbt / .gitlab-ci.yml
Created September 12, 2018 09:30
GitLab CI - Minify JS / CSS and upload them to AWS S3
# DO NOT FORGET TO SET YOUR ENVIRONMENT VARIABLES : AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION (protected)
stages:
- minify
- upload
minify_js:
image: node:latest
stage: minify
before_script:
@ahmadawais
ahmadawais / upload-a-file.MD
Created June 18, 2017 11:07 — forked from websupporter/upload-a-file.MD
Upload a file using the WordPress REST API

Upload files

Using the REST API to upload a file to WordPress is quite simple. All you need is to send the file in a POST-Request to the wp/v2/media route.

There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle: