Convert a PNG logo into a clean, lightweight SVG with:
- solid fill (no outlines)
- transparent background
- scalable for mobile UI (nav/footer icons)
- CSS-controllable color (e.g. currentColor)
| # Bluetooth Device Removal Tool | |
| Get-PnpDevice -Class Bluetooth | |
| function Prompt-Choice { | |
| param ($Message, $Choices) | |
| $choice = $null | |
| while (-not $Choices -contains $choice) { | |
| $choice = Read-Host "$Message [$($Choices -join '/')]" | |
| } |
| <?php | |
| /* | |
| Plugin Name: WP Attachment Offloader Metadata Migration Plugin | |
| Description: A plugin for converting WP Site from Humanmade/s3-uploads to deliciousbrains/wp-offload for Media Delivery. Not for use in production unless you know what you are doing..! | |
| Version: 1.1 | |
| Author: Connor Stansfield + chatgpt | |
| */ | |
| // Exit if accessed directly | |
| if (!defined('ABSPATH')) { |
| <?php | |
| require_once __DIR__ . '/vendor/autoload.php'; | |
| // using composer "sociallydev/spaces-api": "3.5" | |
| use \SpacesAPI\Spaces; | |
| $spaces = new Spaces('apikey', 'secret'); | |
| $space = $spaces->space('bucket'); | |
| $filename = 'image.png'; |
| # Accessing the logs when you want to test the output of a variable in PHP without using something totally outlandish like a php debugger because aint nobody got time for dat.. | |
| #### terminal into wp docker container | |
| docker exec -it your_container_id bash | |
| #### install nano / vim so you can actually change stuff | |
| apt-get update && apt-get install vim nano | |
| #### modify the php.ini file at /usr/local/etc/php/conf.d/conf.ini (use phpinfo(); on any page in your app to see where your php conf.ini is) | |
| nano /usr/local/etc/php/conf.d/conf.ini |
| # edit the my.cnf file in /etc/mysql and add the line | |
| bind-address=0.0.0.0 | |
| # and if you have the line: | |
| skip-networking | |
| # make sure to comment it: | |
| #skip-networking | |
| # restart mysql | |
| sudo service mysql restart |
check clear all files on C drive (keeping other drives intact).
Install chrome with powershell
$Path = $env:TEMP; $Installer = "chrome_installer.exe"; Invoke-WebRequest "http://dl.google.com/chrome/install/375.126/chrome_installer.exe" -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args "/silent /install" -Verb RunAs -Wait; Remove-Item $Path\$Installer
Run chrome and login, do not sync passwords and settings (because why taint your shiny new setup !?)
| # Initial Server Setup | |
| - add a non root user | |
| - give sudo privileges | |
| - enable firewall | |
| https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04 | |
| # Also allow http and https through the firewall | |
| sudo ufw allow http | |
| sudo ufw allow https |
| <?php | |
| /* Commands to create the project. */ | |
| // mkdir <name> & cd <name> | |
| // npm init react-app <name> | |
| // cd <name> | |
| // npm/yarn install | |
| /* To build and deploy. */ |