Skip to content

Instantly share code, notes, and snippets.

View janxious's full-sized avatar
🌰
.

Joel "The Gregarious" Meador janxious

🌰
.
View GitHub Profile
@janxious
janxious / family.lua
Last active September 27, 2019 00:13 — forked from Putnam3145/family.lua
A family tree generator for Dwarf Fortress.
-- export family trees
-- by Putnam https://gist.github.com/Putnam3145/34f7046481256cc4709d
--[====[
family
======
TODO
family -exportToCSV -this -heritage
family -exportToFamilyScript -this -heritage
]====]
@janxious
janxious / jq-cheetsheet.md
Created August 25, 2022 18:04 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@janxious
janxious / _form.html.erb
Created April 10, 2025 04:14 — forked from lazaronixon/_form.html.erb
Hotwire Event-Driven Update Pattern
<%= form_with model: citizen, class: "card flex flex-col gap", data: { controller: "form" } do |form| %>
<div class="flex flex-col gap mb-2">
<div class="flex flex-col gap-half">
<% countries = Country.order(:name) %>
<%= label_tag :country_id, "Country", class: "text-sm font-medium leading-none" %>
<%= select_tag :country_id, options_from_collection_for_select(countries, :id, :name, citizen.country_id), include_blank: "Select one", class: "input", data: { action: "form#submit", form_submitter_param: "on_country_change" } %>
</div>
<div class="flex flex-col gap-half">
<% states = State.where(country_id: citizen.country_id).order(:name) %>