#!/usr/bin/env orgp
{
"outDir": "./dist"
}
| // orgp.dev/x.js - Mini-games demo for org-press flyer | |
| import confetti from "https://esm.sh/canvas-confetti"; | |
| const el = (t) => document.createElement(t); | |
| // Game 1: Dino runner | |
| const dino = (container) => { | |
| container.innerHTML = ` | |
| <div style="position:relative;width:100%;max-width:600px;height:150px;margin:0 auto;border-bottom:3px solid #333;overflow:hidden;font-size:2em"> | |
| <span id="dino" style="position:absolute;bottom:0;left:50px;transition:bottom 0.3s">🦖</span> | |
| <span id="cactus" style="position:absolute;bottom:0;right:-50px">🌵</span> |
| <html> | |
| <head> | |
| <title>Tic Tac Toe!</title> | |
| </head> | |
| <body> | |
| <div> | |
| <span> | |
| <input name="" type="text" value="-" size="1"/> | |
| </span> |
| class MovieEmployed { | |
| constructor(name) { | |
| this.name = name; | |
| this.movies = []; | |
| } | |
| addMovie(movieInstance) { | |
| this.movies.push(movieInstance); |
| <html> | |
| <head> | |
| <script src="./index.js"></script> | |
| </head> | |
| <body> | |
| <ul id="repos"> | |
| </ul> | |
| </body> | |
| </html> |
| function ABlockingFunction( stopAtTime ){ | |
| var StartAt = new Date(); | |
| var animation = ['Running...']; | |
| while( StartAt <= stopAtTime ){ | |
| StartAt = new Date(); | |
| animation.push('.') | |
| console.log(animation.join('')); | |
| } | |
| return this; | |
| } |
| #!/bin/bash | |
| LATEST=$(curl https://api.github.com/repos/m3kh/momo/commits | underscore extract '0.sha' | sed s/[^a-zA-Z0-9\_]//g); | |
| CURRENT=$(cat /home/pi/.momo_version | sed s/[^a-zA-Z0-9\_]//g); | |
| echo "${LATEST}"; | |
| echo "${CURRENT}"; | |
| if [ "$LATEST" = "$CURRENT" ]; then | |
| echo "Momo is uptodate"; |
| var inspector = function(obj){ | |
| var config = config || {}, | |
| html = ''; | |
| config.iter = function(e){ | |
| html = '<ul>'; | |
| if( typeof e === "function" ){ | |
| // setTimeout(function(){ | |
| try{ |