Skip to content

Instantly share code, notes, and snippets.

View ziadoz's full-sized avatar

Jamie York ziadoz

View GitHub Profile
@ziadoz
ziadoz / Dockerfile
Created September 30, 2021 16:50
Docker - PHP, Composer, Google Chrome and ChromeDriver
FROM php:8.0-fpm
# Copy Composer:
COPY --from=composer /usr/bin/composer /usr/bin/composer
# Install PHP extensions:
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions zip
@ziadoz
ziadoz / extract-vmdk.sh
Last active January 12, 2024 11:20
Extract VMDK Disk Image on macOS
#!/usr/bin/env bash
# Unzip Vagrant .box file:
tar -xf <box> -C <destination>
# Install 7 Zip:
brew install p7zip
# Extract VMDK:
7z x -y -o<destination> <vmdk>
@ziadoz
ziadoz / enc-dec.sh
Created January 11, 2024 17:38
Bash/ZSH Encrypt/Decrypt File Aliases
#!/usr/bin/env bash
# @see: https://superuser.com/questions/370388/simple-built-in-way-to-encrypt-and-decrypt-a-file-on-a-mac-via-command-line
# @see: https://askubuntu.com/questions/1093591/how-should-i-change-encryption-according-to-warning-deprecated-key-derivat
alias decrypt="openssl enc -d -aes-256-cbc -md sha512 -pbkdf2 -iter 1000000 -in $1 -out $2"
alias encrypt="openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 1000000 -salt -in $1 -out $2"
@ziadoz
ziadoz / composer.json
Created January 11, 2024 17:33
Scrape Twitter using PHP and Symfony Panther
{
"require-dev": {
"symfony/panther": "^2.1",
"dbrekelmans/bdi": "^1.1"
}
}
@ziadoz
ziadoz / readme.MD
Created January 8, 2024 12:19
Laravel - Feature Flag Packages

Feature Flag Laravel Packages

Disable auto-discovery of the package in your composer.json file:

"extra": {
    "laravel": {
        "dont-discover": [
            "package-namespace/package-name"
 ]
@ziadoz
ziadoz / dedupe.txt
Created January 7, 2024 20:59
macOS - De-duplicate Photos
fdupes
------
https://superuser.com/questions/481456/finding-and-removing-duplicate-files-in-osx-with-a-script
https://bbs.archlinux.org/viewtopic.php?id=265148
https://askubuntu.com/questions/177346/how-to-delete-duplicate-files-with-fdupes
https://superuser.com/questions/386199/how-to-remove-duplicated-files-in-a-directory/691551#691551
fdupes -r /Volumes/files/Photos
@ziadoz
ziadoz / ExampleTest.php
Created January 3, 2024 17:29
Laravel Dusk - Disable Bootstrap 4 CSS Transitions
<?php
namespace Tests\Browser;
use Tests\DuskTestCase;
class ModalTest extends DuskTestCase
{
public function test_modal(): void
{
@ziadoz
ziadoz / readme.md
Created December 22, 2023 21:48
macOS - Restore Missing Finder Progress Window
@ziadoz
ziadoz / ditto.sh
Created December 22, 2023 21:43
macOS - Merge Folders Using The Command Line (Ditto)
# @see: https://apple.stackexchange.com/a/341906
# Merge folder and all sub-folders of A and B into C.
ditto A C
ditto B C
@ziadoz
ziadoz / commas.html
Last active December 20, 2023 20:47
HTML/CSS - Human List, Commas, Oxford Commas
<!DOCTYPE html>
<html>
<head>
<style>
:root {
--commas-separator: ", ";
--commas-last-separator: " & ";
}
ul.commas,