Skip to content

Instantly share code, notes, and snippets.

View joereynolds's full-sized avatar

Joe Reynolds joereynolds

View GitHub Profile
@joereynolds
joereynolds / animates.py
Last active January 12, 2024 08:53
Pygame animation class
import pygame
from src.countdown_timer import CountdownTimer
import src.config.events as e
class Animates:
def __init__(
self,
parent: pygame.sprite.Sprite,
frames,
named_frames: dict = {},
<?php
interface PaymentProvider
{
public function purchase();
}
class BrainTreePaymentProvider implements PaymentProvider
{
public function purchase()
@joereynolds
joereynolds / report_unused_functions.sh
Last active February 7, 2021 11:31
Rough and naive script to find unused functions in php files
#!/bin/bash
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)"