Skip to content

Instantly share code, notes, and snippets.

@mythril
mythril / fanmade-tcs-for-fallout.md
Last active April 11, 2024 15:05
Fallout Total Conversions

Fallout Total Conversions

Rules for inclusion in list:

  • Must be made as a mod for an official Fallout game
  • More if I think of more.

Mainline Game Remakes / Conversions

Engine: Fallout 4

@mythril
mythril / +page.svelte
Created September 5, 2023 07:08
Cyclic dependency, I think
<script lang="ts" context="module">
import { writable } from "svelte/store";
export type ObjectValues<T> = T[keyof T];
export const Digit = {
Thumb: "Thumb",
Fore: "Fore",
Index: "Index",
Ring: "Ring",
@mythril
mythril / wish-list.md
Created July 16, 2023 16:41
web wish-list / ideas
  • Opinionated code formatter that targets making code better for maintainers and collaboration, not just being 'prettier' I.E. favoring things that make cleaner diffs over things that look nicer in the editor, specifically:
    • newline before each html attribute
    • newline before each "semantic unit" in CSS (for example each box-shadow portion, or background definition)
    • commas / list seperators at the beginnig of the line in css and in lists in general
    • ignoring unconventional line-breaking patterns under defined scenarios
    • general rule of thumb: simpler diff is more important than textual prettiness
    • anything that can change in isolation should be isolated (think one html attribute per line)
      • may be counters to this, for example, parameter definitions can get irritating if they are broken out too much
      • longish terms in 'if' statements might also be odd to break out
  • css classnames / html class attributes could be a nightmare
@mythril
mythril / pure_functional_javascript_queue.js
Last active June 21, 2018 20:46
pure_functional_javascript_queue.js
function pair(a, b) {
return function (selector) {
if (selector) {
return a;
}
return b;
}
}
function first(p) {
@mythril
mythril / .prompt
Created June 20, 2017 21:54
nice bash prompt
function showPath() {
path=$(dirname `pwd`);
wd=$(basename `pwd`);
homedir=$(echo ~);
escaped=$(printf '%q' $homedir);
out=$(echo $path|sed -e 's%^'${escaped}'%~%');
echo -n $out;
echo -n "/";
tput setaf 2;
tput bold;
PHP Warning: Unknown: open_basedir restriction in effect. File(/home/<domain1>/httpdocs/abyssguard/abyssguard.php) is not within the allowed path(s): (/home/<domain2>/:/tmp/:/home/<domain1>/httpdocs/abyssguard/) in Unknown on line 0
![XML encoding gone wild](http://i.imgur.com/XBujjUm.png)
This was caused by a product having a title with HTML in it, specifically the <title> tag,
here is the offending snippet:
```xml
<item>
<title>Edward 1</g:quantity>
<g:availability>in stock</g:availability>
<g:brand>Safari Limited</g:brand>
<?php defined( "_VALID_MOS" ) or die( "Direct Access to this location is not allowed." );
header('X-UA-Compatible: IE=Edge');
// This will turn on the StarField corner icon.
$STN_tpl['StarField'] = false;
// You can cut'n'paste the codes here.
$STN_tpl['StarField_CNP'] = <<<CNP
<span id="siteseal"><script src="https://seal.starfieldtech.com/getSeal?sealID=iT8sV1o2aQOjr8mf0UigKGyrj239Vt6uYlnCAsabbmc3jv7veAzwcix6LXM" type="text/javascript"></script></span>
Graphics3D 800, 600
SetBuffer BackBuffer()
Global camera = CreateCamera()
Global cube = CreateCube()
Global light = CreateLight()
Global texture = CreateTexture(64, 64)
RotateEntity light, 90, 0, 0