From 103ca563a63b570026888eb0958c45b429c7a34c Mon Sep 17 00:00:00 2001 From: Bopda-joan-kelian Date: Wed, 25 Jun 2025 05:20:05 +0100 Subject: [PATCH] Update and rename README.md to Astro -ultra Application web --- Astro -ultra | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 43 ----------------- 2 files changed, 127 insertions(+), 43 deletions(-) create mode 100644 Astro -ultra delete mode 100644 README.md diff --git a/Astro -ultra b/Astro -ultra new file mode 100644 index 0000000..90b0dc6 --- /dev/null +++ b/Astro -ultra @@ -0,0 +1,127 @@ + + + + + + + + Astro Ultra + + +
+
+ Astro +
+
+
+ + +
+ + + +body { + background: radial-gradient(circle at center, #000 40%, #0a0a2a 100%); + font-family: sans-serif; + color: white; + text-align: center; +} +#astro-face { + position: relative; +} +#astro-img { + width: 200px; +} +#mouth-animation { + position: absolute; + bottom: 40px; + left: 90px; + width: 20px; + height: 20px; + background: red; + border-radius: 50%; + animation: speak 1s infinite alternate; +} +@keyframes speak { + from { transform: scaleY(1); } + to { transform: scaleY(2); } +} +#simulation-canvas { + margin-top: 20px; + width: 300px; + height: 200px; + background: #111; + border: 1px solid white; +}const synth = window.speechSynthesis; +const recognition = window.SpeechRecognition || window.webkitSpeechRecognition; +const recog = new recognition(); + +function speak(text) { + const utter = new SpeechSynthesisUtterance(text); + synth.speak(utter); + document.getElementById("mouth-animation").style.animationPlayState = 'running'; + utter.onend = () => { + document.getElementById("mouth-animation").style.animationPlayState = 'paused'; + }; +} + +function startListening() { + recog.start(); + recog.onresult = function(e) { + const input = e.results[0][0].transcript; + document.getElementById("response").textContent = "Vous : " + input; + let reply = "Je pense à cela..."; + if (input.includes("masse négative")) reply = "Simulation de masse négative en cours..."; + document.getElementById("response").textContent += "\nAstro : " + reply; + speak(reply); + }; +}const canvas = document.getElementById('simulation-canvas'); +const ctx = canvas.getContext('2d'); +let x = 150, y = 100, vx = -1; + +function draw() { + ctx.clearRect(0, 0, canvas.width, canvas.height); + ctx.beginPath(); + ctx.arc(x, y, 10, 0, Math.PI * 2); + ctx.fillStyle = "cyan"; + ctx.fill(); + ctx.closePath(); + + x += vx; + if (x < 0 || x > canvas.width) vx *= -1; + requestAnimationFrame(draw); +} +draw();{ + "name": "Astro Ultra", + "short_name": "Astro", + "start_url": "./index.html", + "display": "standalone", + "background_color": "#000000", + "theme_color": "#0a0a2a", + "icons": [{ + "src": "assets/icon.png", + "sizes": "192x192", + "type": "image/png" + }] +}self.addEventListener('install', function(e) { + e.waitUntil( + caches.open('astro-ultra').then(function(cache) { + return cache.addAll([ + './', + './index.html', + './style.css', + './main.js', + './simulation.js' + ]); + }) + ); +}); +self.addEventListener('fetch', function(e) { + e.respondWith( + caches.match(e.request).then(function(response) { + return response || fetch(e.request); + }) + ); +});{ + "memory": [] +} diff --git a/README.md b/README.md deleted file mode 100644 index 27c3d3c..0000000 --- a/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Sample GitHub App - -This sample app showcases how webhooks can be used with a GitHub App's installation token to create a bot that responds to issues. Code uses [octokit.js](https://github.com/octokit/octokit.js). - -## Requirements - -- Node.js 12 or higher -- A GitHub App subscribed to **Pull Request** events and with the following permissions: - - Pull requests: Read & write - - Metadata: Read-only -- (For local development) A tunnel to expose your local server to the internet (e.g. [smee](https://smee.io/), [ngrok](https://ngrok.com/) or [cloudflared](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/)) -- Your GitHub App Webhook must be configured to receive events at a URL that is accessible from the internet. - -## Setup - -1. Clone this repository. -2. Create a `.env` file similar to `.env.example` and set actual values. If you are using GitHub Enterprise Server, also include a `ENTERPRISE_HOSTNAME` variable and set the value to the name of your GitHub Enterprise Server instance. -3. Install dependencies with `npm install`. -4. Start the server with `npm run server`. -5. Ensure your server is reachable from the internet. - - If you're using `smee`, run `smee -u -t http://localhost:3000/api/webhook`. -6. Ensure your GitHub App includes at least one repository on its installations. - -## Usage - -With your server running, you can now create a pull request on any repository that -your app can access. GitHub will emit a `pull_request.opened` event and will deliver -the corresponding Webhook [payload](https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request) to your server. - -The server in this example listens for `pull_request.opened` events and acts on -them by creating a comment on the pull request, with the message in `message.md`, -using the [octokit.js rest methods](https://github.com/octokit/octokit.js#octokitrest-endpoint-methods). - -## Security considerations - -To keep things simple, this example reads the `GITHUB_APP_PRIVATE_KEY` from the -environment. A more secure and recommended approach is to use a secrets management system -like [Vault](https://www.vaultproject.io/use-cases/key-management), or one offered -by major cloud providers: -[Azure Key Vault](https://learn.microsoft.com/en-us/azure/key-vault/secrets/quick-create-node?tabs=windows), -[AWS Secrets Manager](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-secrets-manager/), -[Google Secret Manager](https://cloud.google.com/nodejs/docs/reference/secret-manager/latest), -etc.