Skip to content

Instantly share code, notes, and snippets.

View joereynolds's full-sized avatar

Joe Reynolds joereynolds

View GitHub Profile
joereynolds /
Last active January 12, 2024 08:53
Pygame animation class
import pygame
from src.countdown_timer import CountdownTimer
import as e
class Animates:
def __init__(
parent: pygame.sprite.Sprite,
named_frames: dict = {},
View strategy.php
interface PaymentProvider
public function purchase();
class BrainTreePaymentProvider implements PaymentProvider
public function purchase()
joereynolds /
Last active February 7, 2021 11:31
Rough and naive script to find unused functions in php files
function report_unused_functions() {
# Find the function
# Remove the ampersands for pass by reference functions
# Remove everything after and including the ( in the function name
git grep -Ei '(public|private|protected) function' $1 | awk '{print $4}' | tr -d '&' | cut -f1 -d"(" | while read -r function ; do
match_count="$(git grep -i $function| wc -l)"