Skip to content

Instantly share code, notes, and snippets.

View tanmay27vats's full-sized avatar

Tanmay Vats tanmay27vats

View GitHub Profile
@tanmay27vats
tanmay27vats / replace_french_chars.php
Created February 28, 2017 10:04
Replace French orthography to Normal English. I used this to rename folder-name/file-names/slugs
function frenchChars($string)
{
$normalizeChars = array(
'Š'=>'S', 'š'=>'s', 'Ð'=>'Dj','Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A',
'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I',
'Ï'=>'I', 'Ñ'=>'N', 'Ń'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U',
'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss','à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a',
'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i',
'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ń'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u',
@tanmay27vats
tanmay27vats / install.sh
Last active May 28, 2018 04:39
Install pthreads (Multithreading) on Amazon AWS EC2 server having PHP version 5.6.x
#Install pthreads on AWS-EC2 with php5.6
#!/usr/bin/env bash
sudo yum update -y
sudo yum install httpd
cd
wget https://mirror.webtatic.com/yum/el6/latest.rpm
sudo yum install latest.rpm -y
sudo yum-config-manager --enable webtatic
sudo yum clean all
sudo yum install --enablerepo=webtatic php56w php56w-bcmath php56w-gd php56w-imap php56w-mbstring php56w-mcrypt php56w-mysqlnd php56w-pear php56w-xml php56w-soap php56w-devel -y