A convenient reference for adding a GPL license to a work.
All prepared texts are hard wrapped at 80 characters unless stated otherwise.
function rot13(str) { // LBH QVQ VG! | |
var re = new RegExp("[a-z]", "i"); | |
var min = 'A'.charCodeAt(0); | |
var max = 'Z'.charCodeAt(0); | |
var factor = 13; | |
var result = ""; | |
str = str.toUpperCase(); | |
for (var i=0; i<str.length; i++) { | |
result += (re.test(str[i]) ? |
// -- updated in 2020/04/19 covering the issues in the comments to this point | |
// -- remember you also have things like `ensureDirSync` from https://github.com/jprichardson/node-fs-extra/blob/master/docs/ensureDir-sync.md | |
const fs = require('fs') | |
function writeFileSyncRecursive(filename, content, charset) { | |
// -- normalize path separator to '/' instead of path.sep, | |
// -- as / works in node for Windows as well, and mixed \\ and / can appear in the path | |
let filepath = filename.replace(/\\/g,'/'); | |
// -- preparation to allow absolute paths as well |
a quick converter to convert Xresources
format color definitions (from terminal.sexy) to Kitty's color configuration format.
usage:
./xres_to_kitty.py < xres_colors.txt >> ~/.config/kitty/kitty.conf
ideally, you would clear the existing previously generated colors from the kitty conf file before running.
#!/usr/bin/env bash | |
# This script bulk-renames many things in Godot 3 projects to hopefully | |
# make it easier to convert them to Godot 4. The goal is to do as much | |
# replacing as possible here so that the diffs Godot produces are smaller. | |
set -uo pipefail | |
IFS=$'\n\t' | |
# Loops through all text files tracked by Git. |
// A Godot 4 shader to make things appear on top of other things within a range. | |
// Initially, this was made so my characters' facial features would be rendered on top of their hair. | |
shader_type spatial; | |
render_mode unshaded; | |
uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_nearest; | |
// Maximum depth we can overdraw relative to the object original depth, in ENGINE UNITS. |