🌺
- GitHub Staff
- https://reggi.com
- @[email protected]
- in/thomasreggi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Guard<T> { | |
constructor(public value: T) {} | |
isNotArray(): Guard<T extends any[] ? never : T> { | |
return Array.isArray(this.value) ? new Guard<never>(undefined as never) : this as unknown as Guard<T extends any[] ? never : T>; | |
} | |
isNotUndefined(): Guard<Exclude<T, undefined>> { | |
return this.value === undefined ? new Guard<never>(undefined as never) : this as unknown as Guard<Exclude<T, undefined>>; | |
} | |
isNotBoolean(): Guard<Exclude<T, boolean>> { | |
return typeof this.value === 'boolean' ? new Guard<never>(undefined as never) : this as unknown as Guard<Exclude<T, boolean>>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const reservedPathPatterns = [ | |
new URLPattern({ pathname: '/favicon.ico' }), | |
new URLPattern({ pathname: '/robots.txt' }), | |
new URLPattern({ pathname: '/sitemap.xml' }), | |
new URLPattern({ pathname: '/ads.txt' }), | |
new URLPattern({ pathname: '/security.txt' }), | |
new URLPattern({ pathname: '/.well-known/*' }), | |
new URLPattern({ pathname: '/apple-touch-icon.png' }), | |
new URLPattern({ pathname: '/apple-touch-icon-:size1(\\d+)x:size2.png' }), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template id="wc-simplemde-template"> | |
<style> | |
@import 'https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css'; | |
@import 'https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css'; | |
:host { | |
--mainViewMenuHeight: 0 | |
} | |
.wc-simplemde-container { | |
width: 50%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @jsx h */ | |
/** @jsxFrag Fragment */ | |
import { VNode, h, Fragment } from "https://esm.sh/[email protected]"; | |
import { renderToString } from "https://esm.sh/[email protected][email protected]"; | |
import { serve } from "https://deno.land/[email protected]/http/server.ts"; | |
class Next {} | |
type Route = (req: Request) => Promise<Next | Response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELF="${0}" | |
function green () { | |
START="\033[0;32m" | |
END="\033[0m" | |
echo -e "${START}${1}${END}" | |
} | |
USAGE="" | |
declare -gA USAGE_REGISTRY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# shellcheck disable=SC2034 | |
USAGE="<word>" | |
# shellcheck disable=SC2034 | |
DESC="converts hyphens to underscore" | |
main () { | |
echo "$1" | tr '-' '_' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Route { | |
urlPattern: URLPattern | |
constructor ( | |
public method: string, | |
public pathname: string, | |
public handler: (req: Request) => Promise<Response> | Response | |
) { | |
this.urlPattern = new URLPattern({ pathname }) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { serve } from "https://deno.land/[email protected]/http/server.ts"; | |
import * as path from 'https://deno.land/[email protected]/path/mod.ts' | |
import { parse } from "https://deno.land/[email protected]/encoding/yaml.ts"; | |
const cwd = Deno.cwd() | |
const results = `export const chungus = { | |
love: true, | |
meow: (v: string) => v | |
}` |