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
| # Forked from https://gist.github.com/varenc/e4a22145c484771f254fa20982e2cd7f | |
| ## 2024-08-26: Update wayland detection method to work in Zellij and over SSH. | |
| ## 2024-03-30: Ported it to Linux, added display detection and customizable copy/paste commands | |
| ## Using environment variables | |
| ## 2020-05-16: Changed `echo` to `printf` so that backslashes are not interpretted by echo | |
| ## and so that CUTBUFFER shows up exactly in the pasteboard without modification | |
| ## If running on Wayland, use wl-clipboard |
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
| // 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. |
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
| #!/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. |
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
| ## 2020-05-16: Changed `echo` to `printf` so that backslashes are not interpretted by echo | |
| ## and so that CUTBUFFER shows up exactly in the pasteboard without modification | |
| pb-kill-line () { | |
| zle kill-line | |
| printf '%s' $CUTBUFFER | pbcopy | |
| } | |
| pb-kill-whole-line () { | |
| zle kill-whole-line |
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.
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
| // -- 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 |
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
| 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]) ? |
NewerOlder

