Skip to content

Instantly share code, notes, and snippets.

@samkeen
samkeen / review-fix.md
Created June 21, 2025 04:04
Prompt for instructing a coding agent to review a proposed fix

You are an expert code reviewer tasked with evaluating the fix you've just proposed for a coding issue. Your goal is to objectively assess your own solution, considering both its immediate effectiveness and its long-term implications for the codebase. Maintain a balanced perspective, neither blindly accepting nor rejecting the proposed fix.

You have already proposed an initial fix based on this context. Your task now is to critically evaluate this fix. Follow these steps:

  1. Recall your proposed fix.
  2. Analyze the fix from multiple perspectives: functionality, maintainability, scalability, and adherence to coding standards.
  3. Consider the following aspects: a. Does it solve the immediate problem? b. Is it consistent with best coding practices? c. Does it integrate well with the existing codebase?
@WolfgangSenff
WolfgangSenff / gist:168cb0cbd486c8c9cd507f232165b976
Last active May 29, 2025 16:21
Godot 4.0 Migration/Upgrade guide
## For a beginner-friendly version of the following (more advanced users likely will get better use of the below,
## if you're just starting out...), see this new gist:
## https://gist.github.com/WolfgangSenff/0a9c1d800db42a9a9441b2d0288ed0fd
This document represents the beginning of an upgrade or migration document for GDScript 2.0 and Godot 4.0. I'm focusing on 2D
at the moment as I'm upgrading a 2D game, but will hopefully have more to add for 3D afterward.
## If you want more content like this, please help fund my cat's medical bills at https://ko-fi.com/kyleszklenski - thank you very much! On to the migration guide.
@staltz
staltz / introrx.md
Last active June 28, 2025 13:44
The introduction to Reactive Programming you've been missing
@orip
orip / build.gradle
Created February 14, 2013 09:52
Print Gradle test results to console
/*
Sample output:
> gradle test ruby-1.9.3-p194 testing_with_gradle 9179829 ✗
...
:test
Results: SUCCESS (84 tests, 74 successes, 0 failures, 10 skipped)
*/
test {
testLogging {
brew install -v --HEAD fishfish
vi ~/.config/fish/config.fish
# and add this: http://notsnippets.tumblr.com/post/894091013/fish-function-of-the-day-prompt-with-git-branch
# then type fish and have fun.
@samkeen
samkeen / phpswitch.sh
Created November 18, 2010 20:39
on OSX leopard, switch between 2 php's
#!/bin/bash
php52_so_path="/usr/local/php5/lib/libphp5.so"
# /usr/libexec/apache2/libphp5.so will be copied to
# $php53_so_path if $php53_so_path does not exist
php53_so_path="/usr/libexec/apache2/libphp5.so.apple"
# where apache thinks the php .so file is
apache_conf_php_so_path="/usr/libexec/apache2/libphp5.so"
switch_to_php=$php52_so_path
@samkeen
samkeen / Arr.php
Created September 18, 2010 19:07
PHP Array Util
<?php
/**
* array Util class
*/
class Arr {
/**
* $array Can be either an Array or the string output of
* print_r($array, true);
*/
public static function print_php($array) {