This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
const { Storage } = require('@google-cloud/storage'); | |
const GOOGLE_CLOUD_PROJECT_ID = "portfolio-umut-yildirim"; | |
const BUCKET_NAME = "screenshot-jobs-portfolio-umut-yildirim"; | |
exports.run = async (req, res) => { | |
res.setHeader("content-type", "application/json"); | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "screenshot-api", | |
"version": "0.0.1", | |
"dependencies": { | |
"puppeteer": "^1.8.0", | |
"@google-cloud/storage": "^6.7.0" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[build] | |
command = "rm -rf __obsidian __site && mkdir __obsidian && mv * __obsidian || true && git clone https://github.com/umuthopeyildirim/hopes-mindmap-zola.git __site && __site/run.sh" | |
publish = "public" | |
[build.environment] | |
LANDING_BUTTON = "Explore" | |
LANDING_DESCRIPTION = "This garden is a collection of notes, ideas and explorations I am currently cultivating. It is a work in progress experiment to push myself to write and learn more." | |
LANDING_PAGE = "home" | |
LANDING_TITLE = "Welcome to my Digital Garden!" | |
PYTHON_VERSION = "3.8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global $*/ | |
jQuery('body').append('<div id="board"></div><style>#board,body{overflow: hidden;z-index:99999999;background-color:#fff}#board{z-index:99999999;color:white; width:440px;height:440px;border:1px solid #000;}#highScore,#score,#timer{z-index:99999999;color:#fff}.apple,.snake{z-index:99999999;display:block;width:20px;height:20px;position:absolute;user-select:none}.snake{z-index:99999999;background-color:green;}#snake-head{z-index:99999999;background-color:#006400}.apple{z-index:99999999;background-color:red;}</style>'); | |
// Set window sessionStorage to keep track of high scores (lowest time) | |
sessionStorage.setItem("highScore", 0); | |
// timer variables | |
var timer = $('#mega_menu_dd_31'); | |
var timeStr; | |
var time; |