Skip to content

Instantly share code, notes, and snippets.

View Djuki's full-sized avatar

Ivan Đurđevac Djuki

  • Freelancer
  • Serbia
  • 06:46 (UTC -12:00)
  • X @Djuki
View GitHub Profile
@ivanhoe011
ivanhoe011 / cleanup.php
Last active March 12, 2023 13:12
Proper way to remove all metadata from an image
<?php
$img = new Imagick($img);
// code by Max Eremin http://php.net/manual/en/imagick.stripimage.php#120380
// we need to keep the ICC profiles
$profiles = $img->getImageProfiles('icc', true);
// but remove everything else
@umpirsky
umpirsky / list.md
Last active April 23, 2021 10:10
Symfony e-commerce solutions.
@padraic
padraic / checksslcontext.php
Last active October 29, 2020 01:10
Correct SSL/TLS Context Settings for file_get_contents() and other PHP stream calls under PHP 5.5 (or earlier)
<?php
ini_set('display_errors', 1);
/**
* This script check how PHP makes HTTPS (SSL/TLS) requests using PHP Streams
* or cURL. Configuration options are passed as GET parameters, for example:
* http://localhost/checksslcontext.php?reconfigure=1
*
* Configuration:
* http://localhost/checksslcontext.php
* Basic PHP Streams using file_get_contents(). Default settings.
@julionc
julionc / 00.howto_install_phantomjs.md
Last active November 6, 2024 15:45
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@dhrrgn
dhrrgn / .gitattributes
Last active December 19, 2015 12:18
Stop hoping that other's core.autocrlf is set correctly. Add this .gitattributes to the root of your repo. Add any specific files to ensure Git doesn't try anything funny on you. If you think i missed a common extension, let me know in the comments. See here for more details: http://timclem.wordpress.com/2012/03/01/mind-the-end-of-your-line/
# Ensures all line endings are committed as LF, but will checkout with native line endings
* text=auto
# -- Override Section, just in-case Git tries to be sneaky
# Ensure that these files are recognized as text
*.asp text
*.aspx text
*.asx text
*.c text