Skip to content

Instantly share code, notes, and snippets.

@faresd
faresd / sdf
Created October 10, 2017 14:37
sdfsdf
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "beta-dot-ao-docs-staging.appspot.com"
},
"host": "beta-dot-ao-docs-staging.appspot.com",
"basePath": "/_ah/api",
"schemes": [
"https"
# In case of 'unlisted' target, only passing 'publishTarget' as a request header works
if [[ ${PUBLISH_TARGET} == 'unlisted' ]]; then
HTTP_CODE=$(curl \
-w %{http_code} \
-o api-response.json \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "x-goog-api-version: 2" \
-H "Content-Length: 0" \
-H "publishTarget: $PUBLISH_TARGET" \
-X POST \
@faresd
faresd / prismic-php-website-starter
Last active January 30, 2020 16:58
Run Prismic PHP Website starter on windows 10
install XAMPP
https://www.apachefriends.org/index.html
install composer
https://getcomposer.org/download/
run composer in project root
php composer.phar install
const getAllPages = (allData, endCursor) =>
getPage(endCursor)
.then(response => {
if (response.pageInfo.hasNextPage) {
return getAllPages(response.edges, response.edges.cursor)
.then(nextPage => allData.push(nextPage))
} else {
return allData
}
})
request headers in ios:
GET /graphql
Accept: */*
Content-Type: application/json
Origin: https://prismic-graphql-pagination.netlify.app
Referer: https://prismic-graphql-pagination.netlify.app/all-posts
User-Agent: Mozilla/5.0 (iPad; CPU OS 12_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Mobile/15E148 Safari/604.1
Prismic-ref: XuDzRxAAACMAedKh