Skip to content

Instantly share code, notes, and snippets.

View uaoleg's full-sized avatar

Oleg Poludnenko uaoleg

View GitHub Profile
@uaoleg
uaoleg / SoftDelete.php
Last active March 18, 2020 11:42
Yii2 ActiveRecord Soft Delete behavior
<?php
namespace common\traits;
/**
* Soft delete behavior for Yii2 ActiveRecord
*
* @copyright (c) 2015, Oleg Poludnenko
* @license https://opensource.org/licenses/MIT MIT
*
# PatchCleaner - to cleanup Windows\Installer folder
https://superuser.com/questions/707767/how-can-i-free-up-drive-space-from-the-windows-installer-folder-without-killing/920713#920713
http://www.homedev.com.au/Free/PatchCleaner
# Configuration Manager Properties - to cleanup ccmcache
- Open "Configuration Manager Properties" in the control panel. You may need to change the control panel to "icon view" instead of "category view".
- Go to the "cache" tab
- Click "Configure Settings" and acknowledge the UAC Prompt if prompted
- The "Delete Files" button should become available. Click this button to clear files. It will automatically keep any files which should not be deleted.
https://superuser.com/questions/786288/what-is-in-c-ccmcache/948720#948720
docker run --rm --interactive --tty --volume LOCAL_PATH_TO_REPO:/app composer install --ignore-platform-reqs --no-scripts
@uaoleg
uaoleg / global-search.js
Created January 10, 2026 18:33 — forked from stracker-phil/global-search.js
Recursively searches the entire object tree for a given value
/**
* Recursively searches the startObject for the given value.
*
* All matches are displayed in the browser console and stored in the global variable "gsResults"
* The function tries to simplify DOM element names by using their ID, when possible.
*
* Usage samples:
*
* globalSearch( document, 'someValue' ); // Search entire DOM document for the string value.
* globalSearch( document, '^start' ); // Simple regex search (function recognizes prefix/suffix patterns: "^..." or "...$").