Skip to content

Instantly share code, notes, and snippets.

Jamie York ziadoz

Block or report user

Report or block ziadoz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ziadoz
ziadoz / ut3_bonus_packs.txt
Last active Mar 28, 2020
Unreal Tournament 3 - Community Bonus Pack (CBP) 1 - 5 Downloads
View ut3_bonus_packs.txt
Community Bonus Pack
--------------------
Homepage Download Links: https://web.archive.org/web/20150707182232/http://cbp.beyondunreal.com/download
CBP 1 - 4 Installer, Zip, PS3 : http://www.mapraider.com/profiles/CommunityBonusPack/maps
CBP 1 Installer, Zip, PS3: http://www.mapraider.com/maps/unreal-tournament-3/capture-the-flag/4322/Community-Bonus-Pack-3-Volume-1
CBP 1 Installer: http://www.fileplanet.com/188272/180000/fileinfo/Unreal-Tournament-3---Community-Bonus-Pack-3:-Volume-1
CBP 2 Installer, Zip, PS3: http://www.mapraider.com/maps/unreal-tournament-3/capture-the-flag/4343/Community-Bonus-Pack-3-Volume-2
@ziadoz
ziadoz / install.sh
Last active Mar 26, 2020
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 / stripe-checkout.html
Last active Mar 23, 2020
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 / awesome-php.md
Last active Mar 19, 2020
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
View awesome-php.md
@ziadoz
ziadoz / pdf-img.sh
Created Mar 11, 2020
Extract Images From PDF / Build PDF From Images / Remove PDF White Margins (Ubuntu)
View pdf-img.sh
#!/usr/bin/env bash
# Extract images from a PDF: https://askubuntu.com/questions/117143/command-line-tool-to-bulk-extract-images-from-a-pdf
sudo apt-get install poppler-utils
pdfimages -all input.pdf images/image
# Build PDF from images: https://stackoverflow.com/questions/8955425/how-can-i-convert-a-series-of-images-to-a-pdf-from-the-command-line-on-linux
sudo apt install img2pdf
img2pdf --output d.pdf images/image*.jpg
@ziadoz
ziadoz / CapsuleServiceProvider.php
Last active Mar 7, 2020
Laravel Eloquent/Capsule Silex Service Provicer
View CapsuleServiceProvider.php
<?php
use Silex\Application;
use Silex\ServiceProviderInterface;
use Illuminate\Database\Capsule\Manager as Capsule;
use Illuminate\Events\Dispatcher;
use Illuminate\Container\Container;
use Illuminate\Cache\CacheManager;
class CapsuleServiceProvider implements ServiceProviderInterface
{
@ziadoz
ziadoz / extract-favicon-images.php
Created Mar 4, 2020
Extract PNG Images From Favicon ICO Images in PHP Using ImageMagick
View extract-favicon-images.php
<?php
// Extract favicon images from file path.
$faviconFile = __DIR__ . '/bbc.ico'
file_put_contents($faviconFile, file_get_contents('https://www.bbc.co.uk/favicon.ico'));
$imagick = new Imagick();
$imagick->readImage($faviconFile);
$imagick->writeImages(__DIR__ . '/bbc-extracted.png', false);
// Extract favicon images from string.
@ziadoz
ziadoz / index.php
Last active Mar 4, 2020
Simple PHP / jQuery CSRF Protection
View index.php
<?php
// See: http://blog.ircmaxell.com/2013/02/preventing-csrf-attacks.html
// Start a session (which should use cookies over HTTP only).
session_start();
// Create a new CSRF token.
if (! isset($_SESSION['csrf_token'])) {
$_SESSION['csrf_token'] = base64_encode(openssl_random_pseudo_bytes(32));
}
@ziadoz
ziadoz / Kernel.php
Last active Mar 3, 2020
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 / artisan_db_open.php
Created Feb 4, 2020 — forked from calebporzio/artisan_db_open.php
An artisan command for opening the project's database in TablePlus
View artisan_db_open.php
<?php
Artisan::command('db:open {connection?}', function ($connection = null) {
if (! file_exists('/Applications/TablePlus.app')) {
$this->warn('This command uses TablePlus, are you sure it\'s installed?');
$this->line("Install here: https://tableplus.com/\n");
}
$driver = $connection ?: config('database.default');
$host = config("database.connections.{$driver}.host");
You can’t perform that action at this time.