Skip to content

Instantly share code, notes, and snippets.

View ziadoz's full-sized avatar

Jamie York ziadoz

View GitHub Profile
@ziadoz
ziadoz / composer_path.json
Last active May 3, 2026 11:58
Composer Using Local Repositories and Branches
{
"repositories": [
{
"type": "path",
"url": "../relative/project/path"
}
],
"require": {
"${project}": "dev-${branch}"
}
@ziadoz
ziadoz / plannr-7016-duplicate-statement-numbers.sql
Created April 10, 2026 17:02
PLANNR-7016: SQL queries for finding and fixing duplicate EDI statement numbers
-- PLANNR-7016: Duplicate EDI Statement Numbers
-- https://github.com/PlannrCrm/plannr/pull/4593
--
-- Both queries below apply to provider_statements and bank_statements.
-- Substitute the table name as needed.
-- ============================================================
-- 1. Check whether any duplicate (firm_id, number) pairs exist
-- Used in shouldRun() on the unique constraint migrations.
@ziadoz
ziadoz / ut3_bonus_packs.txt
Last active March 19, 2026 15:58
Unreal Tournament 3 - Community Bonus Pack (CBP) 1 - 5 Downloads
Community Bonus Pack
--------------------
Homepage Download Links: https://web.archive.org/web/20150707182232/http://cbp.beyondunreal.com/download
CBP 1 - 4 Installer, Zip, PS3 : http://www.mapraider.com/profiles/CommunityBonusPack/maps
CBP 1 Installer, Zip, PS3: http://www.mapraider.com/maps/unreal-tournament-3/capture-the-flag/4322/Community-Bonus-Pack-3-Volume-1
CBP 1 Installer: http://www.fileplanet.com/188272/180000/fileinfo/Unreal-Tournament-3---Community-Bonus-Pack-3:-Volume-1
CBP 2 Installer, Zip, PS3: http://www.mapraider.com/maps/unreal-tournament-3/capture-the-flag/4343/Community-Bonus-Pack-3-Volume-2
@ziadoz
ziadoz / install.sh
Last active February 17, 2026 23:47
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
@ziadoz
ziadoz / gist:88955ba996cb24a367515f6a31e3f451
Created February 3, 2026 18:56
Notepad++ Virus Check
# Check for suspicious directories
Test-Path "$env:APPDATA\Bluetooth"
Test-Path "C:\ProgramData\USOShared"
# Check for suspicious services
Get-Service | Where-Object {$_.Name -like "*Bluetooth*"}
# Check registry run keys
Get-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run"
Get-ItemProperty "HKLM:\Software\Microsoft\Windows\CurrentVersion\Run"
@ziadoz
ziadoz / 2026_01_01_many_to_many.php
Created February 3, 2026 17:52
Laravel 12.x - Many-to-Many Join Table Structure
<?php
use App\Models\Movie;
use App\Models\User;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
@ziadoz
ziadoz / User.php
Created January 25, 2026 22:48
Laravel 12.x - Spatie Media User Avatars
<?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Spatie\Image\Enums\Fit;
use Spatie\MediaLibrary\HasMedia;
@ziadoz
ziadoz / pest_gherkin.php
Last active December 12, 2025 13:00
Pest - Gherkin Formatted Test Names
<?php
function feature(string $feature, callable $callable): void
{
group('Feature: ' . $feature, $callable); // Call Pest's group() method with the feature part of the Gherkin string.
}
function given(string $given)
{
return new class($given) implements Stringable {
@ziadoz
ziadoz / stripe-checkout.html
Last active December 9, 2025 10:07
Custom Stripe Checkout Button
<form action="." method="post">
<noscript>You must <a href="http://www.enable-javascript.com" target="_blank">enable JavaScript</a> in your web browser in order to pay via Stripe.</noscript>
<input
type="submit"
value="Pay with Card"
data-key="PUBLISHABLE STRIPE KEY"
data-amount="500"
data-currency="cad"
data-name="Example Company Inc"
@ziadoz
ziadoz / fix-osx-wifi-battery-drain.md
Last active November 19, 2025 10:35
Fix OSX battery draining on sleep due to wifi activity

Fix OSX battery draining on sleep due to wifi activity

Install SleepWatcher using Homebrew:

sudo chown -R $(whoami) /usr/local
brew update
brew install sleepwatcher

Start the SleepWatcher service: