Skip to content

Instantly share code, notes, and snippets.

Avatar

Jamie York ziadoz

View GitHub Profile
@ziadoz
ziadoz / awesome-php.md
Last active May 23, 2022
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
View awesome-php.md
@ziadoz
ziadoz / stripe-checkout.html
Last active May 18, 2022
Custom Stripe Checkout Button
View stripe-checkout.html
<form action="." method="post">
<noscript>You must <a href="http://www.enable-javascript.com" target="_blank">enable JavaScript</a> in your web browser in order to pay via Stripe.</noscript>
<input
type="submit"
value="Pay with Card"
data-key="PUBLISHABLE STRIPE KEY"
data-amount="500"
data-currency="cad"
data-name="Example Company Inc"
@ziadoz
ziadoz / install.sh
Last active May 18, 2022
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
View install.sh
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
@ziadoz
ziadoz / Kernel.php
Last active Apr 15, 2022
Register Doctrine Mongo ODM Symfony Commands with Laravel (v6.0) Artisan
View Kernel.php
<?php
// app/Console/Kernel.php
namespace App\Console;
use Doctrine\ODM\MongoDB\Tools\Console\Command\ClearCache\MetadataCommand;
use Doctrine\ODM\MongoDB\Tools\Console\Command\{GenerateHydratorsCommand, GeneratePersistentCollectionsCommand, GenerateProxiesCommand, QueryCommand};
use Doctrine\ODM\MongoDB\Tools\Console\Command\Schema\{CreateCommand, DropCommand, ShardCommand, UpdateCommand, ValidateCommand};
use Doctrine\ODM\MongoDB\Tools\Console\Helper\DocumentManagerHelper;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
@ziadoz
ziadoz / human-list.html
Created Apr 7, 2022
CSS Only Human Readable List
View human-list.html
<style>
ul.human-list {
list-style: none;
}
ul.human-list li {
display: inline-block;
}
ul.human-list li:not(:last-child):after {
@ziadoz
ziadoz / prs.sh
Last active Mar 30, 2022
GitHub - Get All Your PRs As JSON
View prs.sh
#!/usr/bin/env bash
# Install GH CLI client
brew install gh
# Configure organisation and username variables
ORG="orgname"
USER="username"
# Retrieve pull request JSON
@ziadoz
ziadoz / composer_path.json
Last active Mar 25, 2022
Composer Using Local Repositories and Branches
View composer_path.json
{
"repositories": [
{
"type": "path",
"url": "../relative/project/path"
}
],
"require": {
"${project}": "dev-${branch}"
}
@ziadoz
ziadoz / delete-tweets.yml
Last active Mar 16, 2022
Run TwitterDelete using Docker Compose
View delete-tweets.yml
name: Delete Tweets
on:
workflow_dispatch:
schedule:
# Once every month
# @see: https://crontab.guru/#0_0_1_*_*_*
- cron: "0 0 1 * *"
jobs:
delete:
runs-on: ubuntu-latest
@ziadoz
ziadoz / NoLockScreen.reg
Created Jan 30, 2022
Disable Windows 10 Lock Screen
View NoLockScreen.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization]
"NoLockScreen"=dword:00000001
@ziadoz
ziadoz / mp3-2-m4a.sh
Created Jan 25, 2022
FFMPEG: MP3 to M4A
View mp3-2-m4a.sh
#!/usr/bin/env bash
for file in *.mp3; do ffmpeg -i $file -c:a aac -vn ${file%.mp3}.m4a; done