Below is a template of GitHub's Workflow Action config file. Workflow is GitHub's CI/CD tool, like CircleCI.
Directory relative to the root of your application - .github/workflows/main.yml.
name: Deploy
on: | const mock = (success, timeout = 1000) => { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(() => { | |
| if(success) { | |
| resolve(); | |
| } else { | |
| reject({message: 'Error'}); | |
| } | |
| }, timeout); | |
| }); |
| // Strava Kudos Clicker Automation Script | |
| // Purpose: Automatically clicks "Give Kudos" buttons on your Strava feed | |
| // Features: | |
| // - Handles dynamic loading of buttons. | |
| // - Smoothly scrolls to each button before clicking. | |
| // - Timeouts between clicks and retries to avoid overloading the page. | |
| // - Maximum retry limit to prevent infinite loops. | |
| // How to Use in Browser's Developer Console: | |
| // 0. Head over to https://www.strava.com/dashboard (Make sure you're logged in) |
| [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;43;68;46m.[0m[38;2;22;35;24m.[0m[38;2;4;7;5m [0m[38;2;0;0;0m [0m[38;2;7;11;7m [0m[38;2;27;43;29m.[0m[38;2;38;59;40m.[0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0 |
| [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;42;66;45m.[0m[38;2;36;42;36m.[0m[38;2;70;71;70m'[0m[38;2;37;43;38m.[0m[38;2;42;66;45m.[0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;42;66;45m.[0m[38;2;27;38;28m.[0m[38;2;50;54;50m.[0m[38;2;27;38;29m.[0m[38;2;43;68;46m.[0m[38;2;96;96;96m [0m[38;2;96;96;96m [0m[38;2;96;96 |
| # Amazon Q pre block. Keep at the top of this file. | |
| [[ -f "${HOME}/Library/Application Support/amazon-q/shell/zshrc.pre.zsh" ]] && builtin source "${HOME}/Library/Application Support/amazon-q/shell/zshrc.pre.zsh" | |
| # Ascii Art on startup | |
| if (( COLUMNS > 100 )); then | |
| cat ~/.startup_art_large.txt | |
| else | |
| cat ~/.startup_art_small.txt | |
| fi | |
| # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
| # Initialization code that may require console input (password prompts, [y/n] |
This is a snippet that uses firebase's firebase-admin to initialize multiple firebase projects in one admin application.
import 'firebase';| function copyFbRecord(oldRef, newRef) { | |
| return Promise((resolve, reject) => { | |
| oldRef.once('value').then(snap => { | |
| return newRef.set(snap.val()); | |
| }).then(() => { | |
| console.log('Done!'); | |
| resolve(); | |
| }).catch(err => { | |
| console.log(err.message); | |
| reject(); |
| <table> | |
| <!-- Header section --> | |
| <thead style="display: table-header-group;"> | |
| <tr> | |
| <td> | |
| <div style="height: 100px; background: rgb(76, 164, 246);"> | |
| <h1>Header</h1> | |
| </div> | |
| </td> | |
| </tr> |