Skip to content

Instantly share code, notes, and snippets.

View phpfour's full-sized avatar

Mohammad Emran phpfour

View GitHub Profile
@phpfour
phpfour / database.sh
Created January 25, 2021 02:21
Frequent MySQL/MariaDB operations
MySQL Operations
--------------------------------------
In this document:
- Export/Import DB
- Export/Import Table from DB
- mysqladmin
- Repair DB
--------------------------------------
@phpfour
phpfour / my.cnf
Created January 25, 2021 02:18 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers)
# Optimized my.cnf configuration for MySQL/MariaSQL
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated January 2020 ~
#
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@phpfour
phpfour / macosx-install-php-oracle-oci8-pdo_oci.md
Created October 14, 2017 10:44 — forked from fhferreira/macosx-install-php-oracle-oci8-pdo_oci.md
Install OCI8 and / or PDO_OCI on OSX via Brew

Installation

This procedure is tested on Mac OS X 10.10.5 with Developpers tools installed (xCode).

PHP 5.6 installed with Homebrew.

Preparation

Download the following files from Oracle website (yes, you need to create an account and accept terms):

@phpfour
phpfour / gist:00b62511c0dc6f9ea36b2c0d98dfa5ed
Created July 21, 2017 15:48 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@phpfour
phpfour / a-new-mac-setup.md
Created June 25, 2017 18:08 — forked from maxfenton/a-new-mac-setup.md
System setup stuff for a new mac

New computer setup

  • a/o 2016-05-21 *

--

Format the drive

  1. Restart with Cmd-R or Cmd-D
  2. Erase drive / 3x if second-hand
  3. Reinstall MacOS
@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 / 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
@phpfour
phpfour / default.vcl
Created January 15, 2016 03:37 — forked from reifman/default.vcl
Example Varnish VCL Configuration e.g. /etc/varnish/default.vcl
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8080";
.connect_timeout = 60s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.max_connections = 800;
}

New computer setup

  • a/o 2015-05-27 *

Format the drive

  1. Restart with cmd-R or cmd-D
  2. Erase drive / 3x if second-handk
  3. Reinstall MacOS