This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This is a script that can be used in conjunection with the PokEditor tool. | |
https://github.com/turtleisaac/PokEditor-v2 | |
When using PokEditor locally, without online Google Sheets, game data is | |
represented in a set of CSVs in the `local/` subdirectory of the user's | |
chosen project directory. | |
These CSVs contain Excel-style Google Sheets formulas that are used to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This script can be used to perform automated speech-to-text on every | |
*.ogg audio file in a directory, recursively. | |
This was written in order to help better document the items in the | |
`sounds` directory represented in Elden Ring's Data0.bhd archive file. | |
Here were the steps taken: | |
1. Extract files including sounds/pck/normal.pck from Data0.bhd in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This code is distributed under the Unlicense https://unlicense.org/ | |
// In other words, I am releasing it as public domain. | |
// Reasonably well working MSDF fragment shader. | |
// Good discussion per shader: https://github.com/Chlumsky/msdfgen/issues/22 | |
export const TextGlyphFragmentShader = ` | |
precision mediump float; | |
// Contains MSDF glyph data | |
uniform sampler2D u_glyphTexture; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Drop background color of most widgets | |
*/ | |
/* | |
* This is a light edit of the "dracula.qss" style file included with | |
* Mod Organizer v2.2.2.1. | |
* | |
* It increases the font size as well as the height of rows in lists and | |
* tables and such, making the interface much more readable on my display. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Put this file in `lib/csv-stringifiers` alongside `abstract.js` | |
'use strict'; | |
const RECORD_DELIMITER = '\n'; | |
class AbstractCsvStringifier { | |
constructor(params) { | |
this._fieldStringifier = params.fieldStringifier; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Watch a file or directory recursively and run a shell | |
// command any time a change to that path is observed. | |
// Usage: | |
// node watch.js <path> <command> | |
// For example: | |
// node watch.js style.scss "sass style.scss style.css" | |
const childProcess = require("child_process"); | |
const fs = require('fs'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Helper to determine if a noun should be preceded by "a" or "an". | |
// This should produce a sensible result in the majority of cases. | |
function englishArticle(noun){ | |
if(!noun || typeof(noun) !== "string"){ | |
return undefined; | |
}else if(noun.length === 1){ | |
return "an"; | |
}else if(noun.toUpperCase() === noun){ | |
return "AEFHILMNORSX".indexOf(noun[0]) < 0 ? "a" : "an"; | |
}else if("AEIOUaeiou".indexOf(noun[0]) >= 0){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Draws an approximated phase diagram given a substance's triple point and critical point. | |
// Goto line 104 to use different inputs from the hydrogen example | |
class Material{ | |
constructor(name, abbreviation, properties){ | |
this.name = name; | |
this.abbreviation = abbreviation; | |
this.properties = properties; | |
this.triplePointKelvin = properties.triplePointKelvin; | |
this.triplePointPascals = properties.triplePointPascals; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require("axios"); | |
// The labels that will be added | |
const labels = [ | |
{ | |
"name": "effort: high", | |
"color": "7319e7", | |
"description": "The issue will probably take a single contributor several days of work to resolve." | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// This script can be used to copy the labels from one github repository to another. | |
// Enter the source and destination repository information toward the bottom of this | |
// source file, as well as an API access token with permission to view the source | |
// repository and to modify the target repository. | |
// WARNING: By default, the script will delete all the labels in the destination | |
// repository before copying them over from the source repository. | |
const axios = require("axios"); |
NewerOlder