Skip to content

Instantly share code, notes, and snippets.

@CruelDrool
CruelDrool / gitattributes_eol_test1.md
Created September 8, 2023 18:12
Testing EOL settings in .gitattributes.

Test1

Setup

Operating system: Windows 10

Settings

git core.autocrlf = true

.gitattributes file:

* text=auto eol=lf
*.bat eol=crlf
@CruelDrool
CruelDrool / png-res.php
Last active February 13, 2022 03:15
Change, add or remove a PNG image's pixel density/resolution/pHYs chunk without any resampling. (PHP CLI)
#!/usr/bin/php
<?php
/*
* Version: 1.0.1
* Author: CruelDrool (https://github.com/CruelDrool)
* Description: Change, add or remove a PNG image's pixel density/resolution/pHYs chunk without any resampling. The core of the code is based upon an answer on Stack Overflow by soulmare: https://stackoverflow.com/a/46541839
*
* For use on Windows:
* 1. Create a folder where you will put this file.
* a. Copy this file into it.
@CruelDrool
CruelDrool / update-test.php
Last active May 10, 2024 19:50
Example of using "Update URI" (new in WordPress 5.8)
<?php
/*
Plugin Name: Testing Update URI
Author: Test Doe
Author URI: https://example.com
Update URI: https://example.com/current.json
Plugin URI: https://example.com
Description: This is a test plugin to test out the new plugin header field "Update URI".
Version: 1.0.0
*/