Skip to content

Instantly share code, notes, and snippets.

View reggi's full-sized avatar
🌺
Learning

Thomas Reggi reggi

🌺
Learning
View GitHub Profile
import ts from "npm:typescript";
import { readFileSync } from "node:fs";
function extractExportsFromFile(filePath: string): string[] {
// Read the file content
const fileContent = readFileSync(filePath, { encoding: 'utf8' });
if (!fileContent) {
throw new Error(`File not found or empty: ${filePath}`);
}
@reggi
reggi / github-milestones-redirect.js
Last active January 4, 2024 18:22 — forked from lospoy/github-milestones-redirect.js
Redirects GitHub's Milestones to a specific Sort
// ==UserScript==
// @name GitHub Milestones Redirect
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Redirects to GitHub milestones with specific parameters on link click
// @author You
// @match https://github.com/*
// @grant none
// ==/UserScript==
@reggi
reggi / h-frag.ts
Last active December 12, 2023 21:15
import { WebComponent, html } from 'web-component-base'
class HFrag extends WebComponent {
static props = {
as: 'h1',
hover: false
}
text: string
constructor () {
---
type Props = {
id?: string,
class?: string,
value?: number,
onchange?: string,
style?: string,
hideSelector?: boolean,
showSelectorOnHover?: boolean
}
---
import { createHash } from 'node:crypto';
import fs from 'node:fs/promises';
import path from 'node:path';
type Props = {
src: string,
alt?: string,
class?: string,
}
const { src, alt, class: className } = Astro.props
@reggi
reggi / alpha.js
Created November 26, 2023 06:25
Example
console.log('hello world')
// ==UserScript==
// @name Hide LinkedIn Posts
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Hide posts with MongoDB as the employer on LinkedIn
// @author You
// @match *://www.linkedin.com/*
// @grant none
// ==/UserScript==
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"]
}
// ==UserScript==
// @name mastodon-bigger-input-box
// @version 1.0.0
// @description Modify the CSS of a specific element on page load
// @author Thomas Reggi
// @match https://indieweb.social/*
// @grant none
// ==/UserScript==
(function() {
@reggi
reggi / ebay-preferences.user.js
Last active March 18, 2024 16:58
Greasemonkey / Tampermonkey Scripts
// ==UserScript==
// @name ebay-preferences
// @namespace https://reggi.github.io/
// @version 1.0.0
// @description My ebay preferences
// @author Thomas Reggi
// @match https://www.ebay.com/*
// ==/UserScript==
(function() {