Skip to content

Instantly share code, notes, and snippets.

View phpfour's full-sized avatar

Mohammad Emran phpfour

View GitHub Profile
@phpfour
phpfour / New Mac Setup.md
Last active November 29, 2015 08:12
New Mac Setup
@phpfour
phpfour / KeywordFilter.php
Created November 27, 2015 08:49
Keyword Filter
<?php
namespace Docudex\Bundle\DocumentBundle\Search\Filter\Doctrine;
use Doctrine\ORM\Query\Expr;
use Doctrine\ORM\QueryBuilder;
use Docudex\Bundle\DocumentBundle\Search\Filter\FilterInterface;
/**
* Keyword Filter
@phpfour
phpfour / PdfCreator.php
Created November 27, 2015 08:48
Pdf Creator
<?php
namespace Docudex\Bundle\DocumentBundle\Staged;
use Docudex\Bundle\CoreBundle\Helper\File;
use Docudex\Bundle\CoreBundle\Services\PathConfigurator;
class PdfCreator
{
protected $repositoryKey;
@phpfour
phpfour / .bash_profile
Created November 18, 2015 06:22
Bash Profile
# Sexy Prompt
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then TERM=gnome-256color; fi
if tput setaf 1 &> /dev/null; then
tput sgr0
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
MAGENTA=$(tput setaf 9)
ORANGE=$(tput setaf 172)
GREEN=$(tput setaf 190)
@phpfour
phpfour / deb.sh
Created October 23, 2015 13:49
New Relic Setup
# Get the key:
wget -O - https://download.newrelic.com/548C16BF.gpg | sudo apt-key add -
# Add our repository:
sudo sh -c 'echo "deb http://apt.newrelic.com/debian/ newrelic non-free" > /etc/apt/sources.list.d/newrelic.list'
# Install the package and configure it:
sudo apt-get update
sudo apt-get install newrelic-php5
sudo newrelic-install install
@phpfour
phpfour / tablespace.sql
Last active February 8, 2018 08:13
Oracle
SELECT * FROM DBA_DATA_FILES;
ALTER TABLESPACE TBS_DB
ADD DATAFILE 'D:\APP\RBS\PRODUCT\11.2.0\DBHOME_1\DATABASE\TBS_DB5.DBF'
SIZE 10G
AUTOEXTEND ON;
ALTER DATABASE DATAFILE 'D:\APP\RBS\PRODUCT\11.2.0\DBHOME_1\DATABASE\TITAS_DB2.DBF' AUTOEXTEND ON;

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
Food
Electronics
- Computers
-- Desktops
-- Laptops
--- Core i7
--- Core i3
- Consumer Electronics
- Industrial Electronis
Clothing
@phpfour
phpfour / gist:c70dbfa6a45dd9be09d0
Created January 20, 2015 07:20
Server Preparation
# Ubuntu 12.04
sudo locale-gen en_US
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get install build-essential apache2 git mysql-server curl
sudo apt-get install php5 php5-dev php-pear php5-intl php5-gd php5-mysql php-apc
# CentOS
@phpfour
phpfour / mci.sql
Last active August 29, 2015 14:11
MCI Patient Table
CREATE TABLE `patient` (
`health_id` varchar(255) NOT NULL DEFAULT '',
`national_id` varchar(255) DEFAULT NULL,
`uid` varchar(255) DEFAULT NULL,
`bin_brn` varchar(255) DEFAULT NULL,
`given_name` varchar(255) DEFAULT NULL,
`sur_name` varchar(255) DEFAULT NULL,
`full_name_bangla` varchar(255) DEFAULT NULL,
`address_line` varchar(255) DEFAULT NULL,
`division_id` varchar(255) DEFAULT NULL,