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 / check-actions.js
Last active January 23, 2026 18:40
Check GitHub actions updates
#!/usr/bin/env node
import fs from 'node:fs/promises';
import {styleText} from 'node:util';
import { argv } from 'node:process';
const WORKFLOWS_DIR = argv[2] ?? '.github';
const getLatestVersionInfo = async (repos) => {
if (repos.length === 0 || !process.env.GITHUB_TOKEN) {
@dobladov
dobladov / x-to-cancelx.js
Created January 7, 2026 12:00
Redirect X/twitter to xcancel
// ==UserScript==
// @name Redirect X/Twitter to XCancel
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Redirects x.com and twitter.com URLs to xcancel.com
// @author You
// @match *://x.com/*
// @match *://www.x.com/*
// @match *://twitter.com/*
// @match *://www.twitter.com/*
@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;
}