Skip to content

Instantly share code, notes, and snippets.

View brandonpollack23's full-sized avatar

Brandon Pollack brandonpollack23

View GitHub Profile
@brandonpollack23
brandonpollack23 / .bashrc
Created April 3, 2026 03:45
Hacker news motd script
# Hacker News MOTD
_hn_output=$(source "$HOME/rcfiles/hacker-news.sh")
if [[ -n "$_hn_output" ]]; then
echo "$_hn_output"
else
echo "⏳ Fetching Hacker News in the background..."
fi
unset _hn_output

SpacetimeDB 2.0 benchmark

Here is the source video

Cool Demo but...huh?

I know that sqlite is famously faster than fopen.
This demo showcase was hilarious and cool, but something is off.
I can see how not having tcp between the DB and the app is fast, but over 10x faster than in process sqlite (which can run in memory?) I dont know...

@brandonpollack23
brandonpollack23 / bisect.sh
Created May 16, 2025 02:27
Bisect for perf tests in pulumi
make install
pushd sdk/nodejs
make install_plugin
popd
pushd ../../examples/examples/misc/test
# Capture the output of the test command
test_output_raw=$(esc run pulumi/providers/all -- go test -json . --timeout 4h -v -count=1 -short -parallel 40 --tags=all --run=TestAccAwsTsS3Folder | gotestfmt)
echo "$test_output_raw"
<.table id="products" rows={@products} row_click={&JS.navigate(~p"/products/#{&1}")}>
<:col :let={product} label="Title">{product.title}</:col>
<:col :let={product} label="Description">{product.description}</:col>
<:col :let={product} label="Price">{product.price}</:col>
<:col :let={product} label="Views">{product.views}</:col>
<:col :let={product} label="Categories">
<div :if={product.categories != []} class="group relative">
<span class="flex cursor-pointer items-center text-zinc-400 group-hover:text-zinc-600">
<.icon name="hero-tag-mini" class="h-4 w-4" />
<span class="ml-1 text-xs">{length(product.categories)}</span>
@brandonpollack23
brandonpollack23 / generated.ts
Created December 12, 2024 05:34
pulumi convert generated output for aws vpc provider
```ts
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";
function notImplemented(message: string) {
throw new Error(message);
}
function singleOrNone<T>(elements: pulumi.Input<T>[]): pulumi.Input<T> {
name: random
runtime: yaml
plugins:
providers:
- name: xyz
path: ../deletemepulumiprovider/bin
version: 0.1.0
resources:
myHelloWorld:
@brandonpollack23
brandonpollack23 / AnimatorParameterPostprocessor.cs
Created May 21, 2024 09:21
An animator post processor that generates files for animation parameter strings in unity
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEditor.Animations;
public class AnimatorParameterPostprocessor : AssetPostprocessor
{
// This method is called whenever assets are imported, deleted, or moved
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
{
@brandonpollack23
brandonpollack23 / AnimatorParametersGenerator
Last active May 21, 2024 08:57
A unity editor script that adds a tool in the "tools" menu to generate code artifacts to access animator parameters instead of needing to know strings.
using System.IO;
using UnityEditor;
using UnityEditor.Animations;
public class AnimatorParameterGenerator
{
[MenuItem("Tools/Generate Animator Parameters")]
public static void Generate()
{
string[] guids = AssetDatabase.FindAssets("t:AnimatorController");