Skip to content

Instantly share code, notes, and snippets.

View arcostasi's full-sized avatar
:octocat:
Hello World

Anderson Costa arcostasi

:octocat:
Hello World
View GitHub Profile
@arcostasi
arcostasi / oci8.sh
Last active December 26, 2016 09:59
Install PHP OCI8
#1. Download the desired Instant Client RPM packages. All installations require the Basic or Basic Lite RPM.
http://download.oracle.com/otn/linux/instantclient/121020/oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
http://download.oracle.com/otn/linux/instantclient/121020/oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
#2. As the root user, install the packages with "rpm". For example:
rpm -ivh oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
rpm -ivh oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
@arcostasi
arcostasi / vagrant.sh
Created March 11, 2015 18:35
Vagrant CentOS 6.5 with Parallels
sudo mkdir /vagrant # OSX
sudo chown macuser /vagrant
cd /vagrant
vagrant plugin install vagrant-parallels
vagrant init parallels/centos-6.5
@arcostasi
arcostasi / twig-phalcon.php
Last active August 29, 2015 14:18
USING TWIG WITH PHALCON
// Using Twig with Phalcon PHP
// Twig is a modern template engine for PHP
// Now we can Using Twig with Phalcon
// How to do:
// 1. Install Twing in library as git submodule.
// > git submodule add https://github.com/twigphp/Twig.git app/library/Twig
@arcostasi
arcostasi / Settings - User.sublime
Last active August 29, 2015 14:18
Sublime Text / Settings - User
// Install:
// 1. Package Control
// 2. Phpcs
// 3. SublimeLinter
// 4. DocBlockr
// 5. PHPUnit Completions
{
"color_inactive_tabs": true,
"color_scheme": "Packages/Theme - Afterglow/Afterglow.tmTheme",
"draw_white_space": "all",
@arcostasi
arcostasi / .vimrc
Last active August 29, 2015 14:19
Install vim on CentOS 6-7
> yum install vim-X11 vim-common vim-enhanced vim-minimal
vim ~/.vimrc
set history=700 " Sets how many lines of history VIM has to remember
set nocampatible
colo delek
syntax on
@arcostasi
arcostasi / macports.sh
Created April 19, 2015 13:25
Uninstall packages on MacPorts
sudo port installed | grep <pacote>
sudo port deactivate <pacote>
sudo port uninstall <pacote>
@arcostasi
arcostasi / osxinstall.txt
Created July 28, 2015 13:03
Create a bootable installer for OS X Yosemite
https://support.apple.com/en-us/HT201372
@arcostasi
arcostasi / oci8_dtrace.txt
Created December 17, 2015 19:26
oci8 php5.6 fix dtrace
I fix this problem in my CENTOS 6.6 and php 5.6.8 in these two ways:
- If you need DTRACE:
yum install systemtap-sdt-devel
export PHP_DTRACE=yes
pecl install oci8
- if you don't like DTRACE:
@arcostasi
arcostasi / configure.sh
Last active April 5, 2018 18:10
php configure on FreeBSD & Linux
FreeBSD 10.x-11.x & Linux
make clean
./configure \
--prefix=/usr/local/php7 \
--with-config-file-path=/usr/local/php7/etc \
--with-libdir=/usr/local/lib \
--with-gd \
--with-jpeg-dir=/usr/local/lib \
@arcostasi
arcostasi / htaccess.txt
Created January 26, 2016 19:25
Authorization: Bearer no Apache
Mudar htaccess para aceitar Authorization: Bearer
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]