Skip to content

Instantly share code, notes, and snippets.

View krunal86's full-sized avatar

Krunal Shah krunal86

  • Third Rock Techkno
View GitHub Profile
@krunal86
krunal86 / annotationList.json
Created August 31, 2019 19:48
Annotation List with HTML transcription
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "https://qa.admin.nins.demotrt.com/v1/digital_document/5d0760f4bc341009f7fe1c4f/contentAsText/1bd29987-f44c-4c8c-afa2-ee1c80fad4ea",
"@type": "sc:AnnotationList",
"resources": [
{
"@id": "https://qa.admin.nins.demotrt.com/v1/digital_document/5d0760f4bc341009f7fe1c4f/annos/contentAsText/1",
"@type": "oa:Annotation",
"motivation": "sc:painting",
"resource": {
@krunal86
krunal86 / manifest.json
Created August 31, 2019 19:47
Sample Manifest
{
"_id": "5d0760f4bc341009f7fe1c4f",
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "https://qa.admin.nins.demotrt.com/v1/digital_document/5d0760f4bc341009f7fe1c4f/manifest",
"@type": "sc:Manifest",
"label": "Dalgairns, John Dobrée Bernard, 1818-1876 to Newman, John Henry, 1801-1890",
"metadata": [
{
"label": "Identifier",
"value": "B001-A001-D068"
@krunal86
krunal86 / github-to-bitbucket
Last active May 7, 2019 07:08 — forked from sangeeths/github-to-bitbucket
Forking a Github repo to Bitbucket
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone git@bitbucket.org:abc/myforkedrepo.git
cd myforkedrepo
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync https://github.com/bodleian/iiif-manifest-editor.git
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v
@krunal86
krunal86 / bitbucket-pipelines.yml
Created August 27, 2018 21:54
Angular + Bitbucket Pipeline + Continuous Integration
# This is a sample build configuration for JavaScript.
# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: node:8.10
pipelines:
default:
- step:
const puppeteer = require('puppeteer');
//const mkdirp = require('mkdirp');
const fs = require('file-system');
// Put your custom dimension and name Here
const devices = [
{ name: 'Highest', width: 1920, height: 1080 },
{ name: 'Laptop-1', width: 1366, height: 768 },
{ name: 'Laptop-2', width: 1360, height: 768 },
{ name: 'Small-Desktop-1', width: 1280, height: 800 },
var jwt = require('jsonwebtoken');
var config = require('./../config/config.constants');
module.exports = function (req, res, next) {
// check header or url parameters or post parameters for token
var token = req.body.token || req.query.token || req.headers['x-access-token'] || req.headers['authorization'];
// decode token
if (token) {