Skip to content

Instantly share code, notes, and snippets.

View ratijas's full-sized avatar
🔓
gpg --recv-keys 16FE1EF864EAFBE8209247FAAE69C4B00B02FC69

ratijas ratijas

🔓
gpg --recv-keys 16FE1EF864EAFBE8209247FAAE69C4B00B02FC69
View GitHub Profile
void action::ItemAmiiboCreateFromDropTable::doSpawn(const sead::SafeString& drop, BaseProcHandle* procHandle, const Vec3* additionalPosOffset)
{
if (!drop)
return;
const bool isImportant = ActorInfoData::sInstance->hasTagByName(drop.c_str(), Tag_Important);
if (isImportant && GameDataMgr::sInstance && GameDataMgr::sInstance->getFlagBool("IsGet_" + drop))
return;
if ( sead::SafeStringBase<char>::findIndex(drop, "GameRomHorse") != -1 )
@jfcherng
jfcherng / st4-changelog.md
Last active May 30, 2025 15:19
Sublime Text 4 changelog just because it's not on the official website yet.
@tmccombs
tmccombs / README.adoc
Last active December 9, 2023 02:58
XDG Default Applications
@divi255
divi255 / logger.py
Last active August 20, 2021 08:08
Logging from embedded Python to Rust
import logging
def rust_emit_log(*args):
# Override from Rust with pyfunction
pass
class RustLogHandler(logging.Handler):
def emit(self, record):
msg = f'{record.name}: {record.getMessage()}'
@romkatv
romkatv / run-command.zsh
Last active September 19, 2025 20:09
Zsh function to run a command and capture its status, stdout and stderr
# Runs "$@" in a subshell with the caller's options, sets reply=(stdout stderr)
# and returns the status of the executed command. Both stdout and stderr are
# captured completely, including NUL bytes, incomplete UTF-8 characters and
# trailing LF, if any.
#
# Example:
#
# % zsh-run-command ls -d ~ /garbage
# % printf 'status: %s\nstdout: %s\nstderr: %s\n' $? "${(q+)reply[@]}"
# status: 2
@mitchcurtis
mitchcurtis / qt-git-sync-to.sh
Created October 30, 2021 12:08
Script to sync Qt modules
#!/bin/bash
usageExample="Usage: cd ~/dev/qt-dev/qtdeclarative && git fetch && git reset --hard origin/dev && cd .. && qt-git-sync-to.sh qtdeclarative HEAD"
if [ -z "$1" ]; then
echo "module argument not supplied"
echo $usageExample
exit 1
fi
@mitchcurtis
mitchcurtis / clean-rebuild-qt-cmake-linux.sh
Created October 30, 2021 12:16
Build scripts for Qt on Linux
#! /bin/bash
# ~/Dropbox/dev/scripts/cmake/clean-rebuild-qt-cmake-linux.sh
set -e
set -o pipefail
topLevelSourceDir=$1
topLevelBuildDir=$2
configPath=$3
@thesamesam
thesamesam / xz-backdoor.md
Last active September 11, 2025 08:38
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background