Skip to content

Instantly share code, notes, and snippets.

View airstrike's full-sized avatar
🦀
0-to-1 founder building with Rust + AI

Andy Terra airstrike

🦀
0-to-1 founder building with Rust + AI
View GitHub Profile
@airstrike
airstrike / main.rs
Created December 14, 2024 19:45
owned LLVM Context pattern for `iced`
use std::collections::HashMap;
use components::sidebar;
use desmos_compiler::{
expressions::{ExpressionId, Expressions},
lang::backends::llvm::{codegen::compile_all_exprs, CompiledExprs},
};
use graph::GraphRenderer;
use iced::{
alignment::Horizontal,
@airstrike
airstrike / Permafrost.jsx
Created November 29, 2024 02:54
Permafrost Archive Manager
/**
* Permafrost.jsx
*
* A React component that provides a modern, interactive UI for viewing and managing
* archive files (ZIP, etc.). Features include:
*
* - File/folder browsing with sorting capabilities
* - Detailed metadata sidebar
* - MacOS-style window controls
* - File type icons and size formatting
@airstrike
airstrike / WireshartViz.jsx
Created November 24, 2024 17:13
Wireshart
/**
* WireshartViz.jsx
*
* Dependencies:
* - react
* - recharts
* - tailwindcss
*
* Required imports:
* import React, { useState, useEffect } from 'react';
@airstrike
airstrike / transcript.md
Created October 20, 2024 23:15
FPSLaunch Design Meeting with Claude 3.5 Sonnet

airstrike: Create a tailwind-css based landing page like the attached. Minimalistic, some text on the left, an image on the right, and then some description down the page, some colored or gradient background. Nothing too fancy. Use Google fonts and CDN-provided resources and give me the full html, css, js so I can put it on a jsfiddle and see what it looks like. Thanks!

image


Claude: I understand you'd like me to create a Tailwind CSS-based landing page inspired by the image you've shared, without directly copying it. I'll design a minimalistic page with text on the left, an image on the right, and some description further down. I'll use Google Fonts and CDN-provided resources to create this layout. Here's the HTML, CSS, and JavaScript code for a similar but original design:

image

@airstrike
airstrike / smart_rectangle.rs
Created August 6, 2024 21:06
Smart Rectangles
//! Rectangles of every kind! Assumes negative sizes imply that the Rectangle
//! was drawn from bottom to top, right to left, or both.
use iced::{Point, Rectangle, Size};
/// Creates a `Rectangle` that ensures positive dimensions.
///
/// If the size is negative in either direction, it subtracts it from the
/// top-left coordinates accordingly and flips it to a positive sign. This way,
/// if a rectangle is drawn from bottom-right to top-left, it still results in a
@airstrike
airstrike / logger.rs
Last active February 23, 2025 20:12
Sample simple logging with tracing
use std::{fs::File, sync::Arc};
use tracing::Level;
use tracing_subscriber::{
filter::{LevelFilter, Targets},
fmt,
prelude::*,
};
pub use tracing::{debug, error, info, trace, warn};
@airstrike
airstrike / fonts.rs
Created July 17, 2024 14:09
iced fonts modified from halloy
use std::borrow::Cow;
use std::sync::OnceLock;
use iced::font;
pub static SANS: Font = Font::new(false);
pub static SANS_BOLD: Font = Font::new(true);
pub static MONOSPACE: iced::Font = iced::Font::MONOSPACE;
pub const ICON: iced::Font = iced::Font::with_name("bootstrap-icons");
@airstrike
airstrike / split.rs
Last active March 30, 2025 13:08
`Split` widget for `iced`
//! Divide the available space in two parts to display two different elements.
//
// Originally from iced_aw. https://github.com/iced-rs/iced_aw/
//
// Kept up-to-date with `iced`'s `master` branch by me (`0.14.0-dev`).
//
// New features:
// - Negative divider position, for measuring from the end (right or bottom)
// MIT License
@airstrike
airstrike / userstyle.css
Created March 8, 2024 17:43
Hide karma and comment score on HN
@-moz-document domain("news.ycombinator.com") {
/* Hide karma and points on replies */
span.pagetop #karma, span.comhead span.score {
visibility: hidden;
position: relative;
display: inline-block;
height: 10px !important;
overflow: hidden;
}
span.pagetop #karma {
@airstrike
airstrike / setup_sqlcl.sh
Last active January 19, 2024 21:47
Installing modern SQLCL shell at NSU
#!/bin/bash
# Navigate to home directory
cd ~
# Create a 'downloads' directory in the home directory
mkdir -p ~/downloads
# Navigate to the 'downloads' directory
cd ~/downloads