Skip to content

Instantly share code, notes, and snippets.

View dobladov's full-sized avatar
📺
Streaming!

Daniel Doblado dobladov

📺
Streaming!
View GitHub Profile
@dobladov
dobladov / gh-action-avg-runtime.js
Last active May 22, 2025 12:03
Calculates the average running time of a GitHub Action workflow using Node.js
#!/usr/bin/env node
// gh-action-avg-runtime.js
// Description: Calculates the average running time of a GitHub Action workflow using Node.js.
// Dependencies: gh cli, jq
import {exec} from 'node:child_process';
import {
promisify,
parseArgs,
@dobladov
dobladov / TestQ5.astro
Created May 8, 2025 09:23
Example of q5.js in an astro component
<div class="canvas" id="canvasContainer" />
<script>
import 'q5';
const canvasContainer = document.getElementById('canvasContainer');
if (!(canvasContainer instanceof HTMLElement)) {
throw new Error('Canvas container not found');
}
@dobladov
dobladov / create-patch.sh
Created October 25, 2024 11:48
Create a patch of an opened PR
## On the branch to patch
git format-patch master --stdout > [name].patch
## Change to the target branch
git checkout [branch]
## Applays the patch while indicating conflicts
git apply --3way changes.patch
@dobladov
dobladov / force-variation.js
Created September 10, 2024 08:48
Force Optimizely variant
window["optimizely"].push({
"type": "bucketVisitor",
"experimentId": "30392500298",
"variationId": '30403370293'
});
@dobladov
dobladov / interfaces.d.ts
Last active July 19, 2024 09:20
Import enum as a type containing the values
export * as SSOProvider from "./sso-providers.js";
export type SSOProvider = typeof SSOProvider[keyof typeof SSOProvider];
@dobladov
dobladov / instructions.md
Created October 30, 2023 20:36
Fix rust issue running raylib on mac

Fix isue of raylib rust on mac

brew link --overwrite cmake
   Compiling raylib-sys v3.7.0
error: failed to run custom build command for `raylib-sys v3.7.0`
@dobladov
dobladov / interfaces.d.ts
Created June 23, 2023 08:22
Extend React.FC with custom properties
export interface ComponentWithInitialProps<T> extends React.FC<T> {
getInitialProps: getInitialProps;
}
@dobladov
dobladov / git-temporary-ignore.md
Created July 6, 2022 09:35 — forked from sloanlance/git-temporary-ignore.md
git: A couple ways to temporarily ignore changed or new files without altering .gitignore.

There are times notifications aren't wanted about either a changed repo file or a new file that needs to be added to the repo. However, adding the name of the file to .gitignore might not be a good option, either. For example, locally-generated files that other users aren't likely to generate (e.g., files created by an editor) or files of experimental test code might not be appropriate to appear in a .gitignore file.

In those cases, use one of these solutions:

  1. If the file is a changed repo file

    Use the command:

    git update-index --assume-unchanged "$FILE"

@dobladov
dobladov / delivery.yml
Created May 3, 2022 08:45
Deliver react-shop
name: Delivery
on:
push:
branches:
- master
- release
- hotfix
- production
- 'lab-[1-3]/**'