Skip to content

Instantly share code, notes, and snippets.

Avatar

Panagiotis Moustafellos pmoust

View GitHub Profile
@pmoust
pmoust / php-upgrade-5.5.x.sh
Last active Jan 26, 2018
Centos 6.4 painless upgrade from #php 5.3.3 to 5.5.x by
View php-upgrade-5.5.x.sh
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
yum install yum-plugin-replace -y
yum replace php-common --replace-with=php55w-common
View httpget
#!/usr/bin/php
<?php
$scheme='tcp';
$host='www.kernel.org';
$port=80;
$path='/';
if(isset($argv[1])) {
$parsedUrl=parse_url($argv[1]);
View Application::resolveActiveLanguage.php
<?php
/**
* Returns the active language.
* @return string the locale.
*/
public function resolveActiveLanguage()
{
$user = user();
$matches = array();
if ($user->hasState('__locale')) {
View gist:6186869
" Modeline and notes {
" vim: set foldmarker={,} foldlevel=0 foldmethod=marker spell:
" }
" Setup Environment {
" The following two lines are required by Vundle.
set nocompatible " be iMproved
filetype off " required!
" Windows Compatibility