Skip to content

Instantly share code, notes, and snippets.

View ab9rf's full-sized avatar

Kelly Kinkade ab9rf

  • Western Suburban Chicagoland, Illinois
  • 17:25 (UTC -05:00)
View GitHub Profile
> Is manslaughter in most jurisdictions, really 3rd degree murder? If so, why keep an old-fashioned sexist term instead of changing it to a non-sexist term with a better description?
Fairly few states define "third degree murder" or "murder in the third degree". I'll touch on a handful that either have three degrees of murder, or are commonly believed to do so.
In Pennsylvania, "murder in the third degree" is _not_ the same as "manslaughter" (which in Pennsylvania, has two flavors, "voluntary" and "involuntary"). In Pennsylvania, "murder 3" is a catch-all offense, and covers all criminal homicides that are neither murder 1 nor murder 2 nor which qualify for mitigation under the voluntary or involuntary manslaughter statutes.
In Florida, murder in the third degree is a so-called "felony murder": a death that occurs during the perpetration of another crime (Florida's law has a long list) that is punished as a murder even though the offender had no specific intent to cause death. Murder 3 in Florida is disti
@ab9rf
ab9rf / gist:8385f042b14a6d1c514f4a66e738bad2
Created February 10, 2020 00:02
DF negative labor categories
-2 is woodworking
-3 is stoneworking
-4 is hunting/related
-5 is healthcare
-6 is farming/related
-7 is fishing/related
-8 is metalsmithing
-9 is jewelry
-10 is crafts
-11 is engineering
@ab9rf
ab9rf / genscript.py
Created November 18, 2019 21:11
A script to use with ghidra for importing DF structures into ghidra. Does not completely work yet; only imports global symbols at the moment.
#TODO write a description for this script
#@author
#@category DwarfFortress
#@keybinding
#@menupath
#@toolbar
#import xml.etree.ElementTree as ET
from ghidra.program.model.data import CategoryPath
@ab9rf
ab9rf / beeManager.config
Created July 19, 2019 13:44
OpenComputer lua script to automate breeding of Forestry bees. Requires Gendustry, possibly other stuff as well.
{storage={A="bottom",B="top",[1]="top",[2]="top",[3]="top",[4]="top",[5]="top",X="top"},
apiaries={
{biome="P-2H",transposer=1,side="north"},
{biome="P",transposer=1,side="south"},
{biome="P",transposer=1,side="east"},
{biome="P+2T",transposer=1,side="west"},
{biome="W",transposer=2,side="north"},
{biome="E",transposer=2,side="south"},
{biome="H",transposer=2,side="east"},
{biome="H",transposer=2,side="west"},
src\Tokenizer.hs:471:9: error:
* Non type-variable argument in the constraint: Stream s m Char
(Use FlexibleContexts to permit this)
* When checking the inferred type
p :: forall t s (m :: * -> *) u.
(Eq t, Num t, Stream s m Char, Enum t) =>
t -> Int -> ParsecT s u m Int
In an equation for `intParser':
intParser base m'
= oneOf digits >>= (p (pred m') . value)
@ab9rf
ab9rf / df-structures.notes.md
Last active August 23, 2018 17:15
some df-structures notes

in item-vectors.xml:

  • ANY_GENERIC37 appears to be "all clothing".
  • ANY_GENERIC39 appears to be "all armor".

in clothing and armor items, the size of the garment is determined by the maker_race field

manager orders:

"Make 1 leather leggings":

@ab9rf
ab9rf / dfhack add-change position assignments.md
Last active December 18, 2016 00:46
dfhack add/change position assignments
@ab9rf
ab9rf / missing_caravan_procedure.md
Created July 16, 2016 18:25
procedure for clearing a "missing" caravan in dwarf fortress 34.03
  • mark all items flagged with "trader" as "garbage_collect"
  • mark all units flagged with "merchant" as "leaving", "cleanup_1", and "cleanup_2", and unmark them as "incoming"

Do not do this if there are any merchants in the displayed units list as it will cause them to disappear. Use this only if a caravan has inexplicably disappeared from your map.

@ab9rf
ab9rf / Minecraft.hs
Created January 28, 2015 10:41
Haskell code to read Minecraft Anvil region files. Should work with anything that uses .mca formats. Interpretation of the NBT data is up to you.
{-# LANGUAGE OverloadedStrings #-}
module Minecraft (
getSourceFiles, traverseChunks, getChunkRefs, extractBlocks,
openDatabase, filterNewerOnly,
nbtGet, nbtKeys,
chunkRefGetXZ,
getChunkBlockData,
fromNBTInteger, fromNBTList, fromNBTString,
NBT(..), ChunkRef(..), Coord(..), distance
@ab9rf
ab9rf / automelt.rb
Created January 4, 2014 18:30
Automelt script for Dwarf Fortress. Requires dfhack.
class AutoMelt
def initialize
end
def is_metal? (item)
item.respond_to?(:mat_type) && item.mat_type == 0 && df.world.raws.inorganics[item.mat_index].material.flags[:IS_METAL]
end
def is_meltable?(item)