Skip to content

Instantly share code, notes, and snippets.

@pestopancake
pestopancake / readme.txt
Created December 29, 2024 14:33
2222 (Puzzlescript Next Script)
Play this game by pasting the script into https://puzzlescriptnext.polyomino.com/editor.html
@pestopancake
pestopancake / readme.txt
Created December 29, 2024 14:22
2222 (Puzzlescript Next Script)
Play this game by pasting the script into https://puzzlescriptnext.polyomino.com/editor.html
@pestopancake
pestopancake / FormatNumberFilter.js
Last active May 27, 2026 15:49
vue js format number - decimals and thousands separator
Vue.filter('formatNumber', function (value, decimals = 2, thousandsSeparator = ',') {
let result = parseFloat(value).toFixed(decimals).toString();
if(thousandsSeparator) result = result.replace(/\B(?=(\d{3})+(?!\d))/g, thousandsSeparator)
return result
});
<?php
/*
* I've added updateRelationFields() to the crudcontroller, and for now I just call this on store/update in the crud controllers that use this field type.
*/
namespace NineDotMedia\BackpackBase\Http\Controllers;
use Backpack\CRUD\app\Http\Controllers\CrudController as CrudControllerBackpack;
use Illuminate\Http\Request;
use NineDotMedia\BulkNotifications\Models\BulkNotification;
@pestopancake
pestopancake / Revision.php
Created June 11, 2019 16:54
revisionable morphmap fix
<?php
namespace App\Vendor\venturecraft\revisionable;
use Illuminate\Database\Eloquent\Model as Eloquent;
use Illuminate\Support\Facades\Log;
/**
* Revision.
*