Skip to content

Instantly share code, notes, and snippets.

View jofftiquez's full-sized avatar
🔥
Building https://mycure.md

Joff Tiquez jofftiquez

🔥
Building https://mycure.md
View GitHub Profile
@jofftiquez
jofftiquez / github-workflow-guide.md
Last active March 16, 2026 08:07
CI/CD - Github Workflow + Firebase Hosting Guide

Template

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: 
@jofftiquez
jofftiquez / Printing.md
Last active December 19, 2025 16:51
Printing skeleton for printing documents with repeating header and footer

Printing Guide

Printing documents in HTML can be tricky at times specially when the content is large and if it requires a repeating headers and footers.

Print Skeleton

<table>
  <!-- Header section -->
 
@jofftiquez
jofftiquez / mock-http.js
Last active December 10, 2025 00:19
Mock HTTP request in javascript using promise and timeout.
const mock = (success, timeout = 1000) => {
return new Promise((resolve, reject) => {
setTimeout(() => {
if(success) {
resolve();
} else {
reject({message: 'Error'});
}
}, timeout);
});
@jofftiquez
jofftiquez / strava-kudos-script.js
Last active September 22, 2025 16:55
Automatic kudos script for Strava web
// 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)
       ..   ..                                   [0
    ..'..                                .....  [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]
@jofftiquez
jofftiquez / firebase-admin-multi-apps-init-ES6.md
Last active January 8, 2025 21:17
Firebase admin - how to initialise multiple applications in ES6 nodejs.

Firebase Admin Multi App Initialization - ES6

This is a snippet that uses firebase's firebase-admin to initialize multiple firebase projects in one admin application.

ES5 version

Using ES6

import 'firebase';
@jofftiquez
jofftiquez / firebase_copy.js
Last active April 7, 2024 13:29 — forked from katowulf/firebase_copy.js
Firebase realtime database - how to copy or move data to a new path?
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();
@jofftiquez
jofftiquez / repeating-sticky-header.html
Created January 19, 2023 06:11
Sample of printing with repeating stick header, and repeating footer.
<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>