Skip to content

Instantly share code, notes, and snippets.

View mikehostetler's full-sized avatar

Mike Hostetler mikehostetler

View GitHub Profile
@ChristianAlexander
ChristianAlexander / Coding Agent README.md
Last active June 13, 2025 07:44
Setup Steps for Copilot Coding Agent in Phoenix Apps

Setup Steps

Workflow File

Add copilot-setup-steps.yml to your .github/workflows directory so Copilot Coding Agent doesn’t get lost trying to set up Elixir and Erlang.

This also ensures a postgres database is running, which is helpful for Phoenix apps out of the box.

Dependencies are cached to make the agent start up quickly, as well as saving on metered GitHub Actions compute time.

Copilot Instructions

@gimenete
gimenete / safeParse.ts
Last active March 15, 2024 16:05
A wrapper around the fetch function that validates the response body against a Zod schema
import z from "zod";
export async function safeFetch<T>(
schema: z.Schema<T>,
input: RequestInfo,
init?: RequestInit
): Promise<T> {
const response = await fetch(input, init);
if (!response.ok) {
@yanofsky
yanofsky / LICENSE
Last active May 26, 2025 05:04
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"