View markov-the-philosopher.html
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
<!doctype html> | |
<html lang="en" class="h-100"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous"> | |
<title>Markov chain philosopher</title> |
View puppeteer-screenshot-api.txt
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') | |
app.get('/api/snapshot', async (req, res) => { | |
if (!req.query.url || !req.query.width || !req.query.height) { | |
res.status(400).send({message: 'Invalid input'}) | |
return | |
} | |
// Create a snapshot and send it back | |
try { | |
const browser = await puppeteer.launch({ headless: true }) |
View nokia-snake-game.html
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
<style> | |
.game { | |
background-color: #f0f0f0; | |
border-radius: 10px; | |
padding: 10px; | |
max-width: 300px; | |
margin: auto; | |
} | |
#snake { |