Skip to content

Instantly share code, notes, and snippets.

@Abban
Abban / fuckClaude.php
Last active April 30, 2026 05:58
Check your Composer dependencies for Claude commits
#!/usr/bin/env php
<?php
$json = json_decode( file_get_contents( __DIR__ . "/../composer.lock" ) );
$claudes = [];
$errors = [];
foreach ( $json->packages as $package ) {
[ $owner, $repo ] = explode( '/', str_replace( [ 'https://github.com/', '.git' ], '', $package->source->url ) );
@Abban
Abban / fuck-claude.js
Last active May 4, 2026 09:25
Check your NPM dependencies for Claude commits
#!/usr/bin/env node
import fs from 'node:fs';
import { Octokit } from 'octokit';
const packages = fs.readdirSync( './node_modules', { withFileTypes: true } ).filter( x => x.isDirectory() && x.name[ 0 ] !== '@' ).map( x => x.name );
const octokit = new Octokit( {
auth: `token ${ process.env.GITHUB_AUTH_TOKEN }`,
} );
const errors = [];
const claudes = [];
@Abban
Abban / SplineShortcuts.cs
Created April 27, 2026 06:58
Add spline mode shortcuts to the Unity editor. Alt-S to toggle Spline Mode, Ctrl-S to select the Create Spline Tool
using System;
using System.Linq;
using UnityEditor;
using UnityEditor.EditorTools;
using UnityEditor.Splines;
using UnityEngine.Splines;
namespace Editor
{
public class SplineShortcuts : UnityEditor.Editor
@Abban
Abban / SplineFollower.cs
Created April 13, 2025 14:47 — forked from Eraile/SplineFollower.cs
Spline Follower for Unity, based on Unity's official Spline package
/*
* Spline Follower for Unity, based on Unity's official Spline package
*
* Developed by Pierre Mercy
* Assisted by OpenAI's GPT-4 Language Model (ChatGPT)
*
* This script allows an object to follow a spline path in Unity.
* It includes various features like speed control, time-based motion, loop, ping pong, and ease in and out functionality.
*
* The script was developed using Unity 2022 and the Splines 2.3.0 package.
Shader "Universal Render Pipeline/2D/Sprite-Lit-Default"
{
Properties
{
_MainTex("Diffuse", 2D) = "white" {}
_MaskTex("Mask", 2D) = "white" {}
_NormalMap("Normal Map", 2D) = "bump" {}
_ZWrite("ZWrite", Float) = 0
// Legacy properties. They're here so that materials using this shader can gracefully fallback to the legacy sprite shader.
@Abban
Abban / InventoryItemTest.php
Last active January 31, 2020 13:01
Integration Tests for Abban's Test
<?php namespace GildedRose\Tests;
use GildedRose\InventoryItem;
use GildedRose\InventoryItemLegendary;
use GildedRose\InventoryItemTicket;
use GildedRose\Program;
use PHPUnit\Framework\TestCase;
class InventoryItemTest extends TestCase
@Abban
Abban / jigoshop-export.sql
Last active August 29, 2015 14:28
Export Jigoshop Products
SELECT
p.post_title AS title,
p.post_content AS description,
p.post_excerpt AS excerpt,
p.ID AS jigoshop_id,
IFNULL(pmp.meta_value, "") AS price,
IFNULL(pmp.meta_value, "") AS original_price,
IFNULL(pmw.meta_value, "") AS weight,
IFNULL(pms.meta_value, "") AS inventory,
IFNULL(pmsk.meta_value, "") AS sku,
@Abban
Abban / Mover.cs
Created August 5, 2015 11:21
Simple 2D Waypoint Movement in Unity
using UnityEngine;
using System.Collections;
public class Mover : MonoBehaviour
{
public Waypoint[] wayPoints;
public float speed = 3f;
public bool isCircular;
// Always true at the beginning because the moving object will always move towards the first waypoint
public bool inReverse = true;
<?php
// http://www.leofs.org/docs/s3_client.html
// i used composer with the following composer.json file and then called composer install
// {"require":{"aws/aws-sdk-php": "2.*"}}
require "vendor/autoload.php";
use Aws\Common\Enum\Region;
use Aws\S3\S3Client;
@Abban
Abban / sample-grunt.js
Created November 20, 2013 15:02
Grunt Sample file
module.exports = function(grunt)
{
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sourceDir: 'themes/third_party/tickets',
cpjsFiles: [
'<%= sourceDir %>/js/cp-custom.js',
'<%= sourceDir %>/js/toolbar-tabs.js',
'<%= sourceDir %>/js/chosen.jquery.js',