Sign in

Austin Gil

@austingil.com
250 followers 98 following 380 posts

Riding bikes. Writing prose. Righting code. Open for work: austingil.com/hire

PostsRepliesMedia
Austin Gil @austingil.com · 02/05/2026
Here's an low-effort favicon snippet: - URL encoded inline image - SVG text element - Emoji icon - Done!
<head>
	<link
	  rel="icon"
	  href="data:image/svg+xml;utf8,
	    <svg xmlns='http://www.w3.org/2000/svg'>
	      <text x='50%' y='50%' dominant-baseline='middle' text-anchor='middle'>😎</text>
        </svg>
      "
    />
</head>
142
Austin Gil @austingil.com · 24/12/2025
It means I can write code like this without worrying about rogue inserts or uncaught exceptions
export const actions = {
  async default(event) {
    const user = requireUser(event);
    
    const body = await validateBody(schema, event);
    
    const result = await insertIntoDb(body);
    
    return result
  }
}
010
Austin Gil @austingil.com · 24/12/2025
The design decision by @svelte.dev Kit to provide tools for early termination of route execution by calling `error()` or `redirect()` is awesome! That any code does not continue to execute after these functions are called makes it much more idiomatic and safe to write route handlers I <3 Svelte :)
export const load = async (event) => {
  if (!event.locals.user) {
    redirect('/')
  }
  
  return `Howdy, ${user.name}!`
}
281
Austin Gil @austingil.com · 23/11/2025
Fuck it...
<button onclick="(() => {
  window.confirm('You sure...🤨')
})()"
>Delete</button>Promise.reject().catch(() => {
  window.alert('My bad...😬')
})
010
Austin Gil @austingil.com · 03/06/2025
Awfully philosophical for a government form, aren't we?
A dropdown in a form asking, "Am I a Business of an Individual?:
000
Austin Gil @austingil.com · 14/05/2025
Is @svelte.dev the Python of JavaScript Frameworks? Reference: xkcd.com/353/
Two stick men. One is on the ground, the in the air:
One: You're flying! How?
Other: Python!
Other: I learned it last night! Everything is so simple! Hello World is just print "Hello, world!"
One: I dunno...Dynamic typing? whitespace!?
Other: Come join us! Programming is fun again! It's a whole new world up here!
One: But how are you flying?
Other: I just typed 'import antigravity'
One: That's it?
Other: ...I also sampled everything in the medicine cabinet for comparison. But I think this is the Python.
030
Austin Gil @austingil.com · 07/06/2023
Really happy with these SVG components. Define SVG library once. Add <SvgDefs> to your app root. Use <Svg> to add individual SVGs. JSDocs makes proper usage and discovering available icons easy. No need to memorize anything. github.com/AustinGil/opapi/blob/mai…
import { splitProps } from 'solid-js';

/**
 * @typedef {import("solid-js").JSX.SvgSVGAttributes<SVGSVGElement>} SVGAttributes
 */

const definitions = {
  'icon-spinner': `<symbol id="icon-spinner" viewBox="0 0 24 24">...</symbol>`,
  'icon-dice': `<symbol id="icon-dice" viewBox="0 0 32 32">...</symbol>`,
};/**
 * @param {SVGAttributes & {
 * alt: string,
 * } & (
 * { href: keyof definitions, icon?: never } |
 * { icon: keyof definitions, href?: never }
 * )} p
 */
export default function (p) {
  const [local, props] = splitProps(p, ['href', 'icon', 'alt']);

  return (
    <svg
      classList={{
        icon: !!local.icon,
        [String(local.icon)]: !!local.icon,
      }}
      role="presentation"
      {...props}
    >
      <use href={`#${local.href || local.icon}`} />
      {local.alt && <span class="visually-hidden">{local.alt}</span>}
    </svg>
  );
}export function SvgDefs() {
  return (
    <svg
      aria-hidden="true"
      style={{
        position: 'absolute',
        width: '0',
        height: '0',
        overflow: 'hidden',
      }}
      version="1.1"
      xmlns="http://www.w3.org/2000/svg"
    >
      {/* eslint-disable-next-line solid/no-innerhtml */}
      <defs innerHTML={Object.values(definitions).join('')} />
    </svg>
  );
}Several examples of the <Svg> component with red squiggles under the ones that do not match TypeScript rules. There is also a popup showing the intellisense suggestions.
000