Skip to content

Instantly share code, notes, and snippets.

View avandrevitor's full-sized avatar
😎
A mind that opens up to a new idea never returns to its original size

André Vitor Cuba de Miranda avandrevitor

😎
A mind that opens up to a new idea never returns to its original size
View GitHub Profile
@avandrevitor
avandrevitor / bootstrap.php
Last active August 29, 2015 14:00
Paranauês Loucos com Doctrine Tools
<?php
require_once "vendor/autoload.php";
use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\EntityManager;
$paths = array("./src/","./metadata/");
$isDevMode = true;
@avandrevitor
avandrevitor / phpunit.xml.dist
Last active April 24, 2018 10:35
My PHPUnit Default
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
backupGlobals="true"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
cacheTokens="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
@avandrevitor
avandrevitor / dbdoc_plugin.lua
Last active September 28, 2023 01:37
Gerador de Dicionário de Dados para Mysql Workbench
--
-- CakeSchema Export
-- Based on DoctrinExport (http://code.google.com/p/mysql-workbench-doctrine-plugin/)
--
-- Testing
-- catalog= grtV.getGlobal("/wb/doc/physicalModels/0/catalog")
-- CakeSchema:writeToClipboard(catalog)
--
-- standard module/plugin functions
--
@avandrevitor
avandrevitor / sources.list.br
Created April 20, 2016 23:39
Sources List Ubuntu Precise 32bits
#------------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
#------------------------------------------------------------------------------#
###### Ubuntu Main Repos
deb http://55.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb-src http://55.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
###### Ubuntu Update Repos
@avandrevitor
avandrevitor / .vimrc
Last active June 28, 2016 20:33
My .vimrc
set number
syntax on
colorscheme torte
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoindent
set textwidth=80
@avandrevitor
avandrevitor / .bashrc
Created June 28, 2016 21:26
My .bashrc
# http://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html
# https://github.com/curvve/themes/blob/master/NightLion%20themes/OSX%20Terminal/bashrc
export TERM="xterm-color"
alias ls="ls -lhGa --color=auto"
alias ll='ls -la'
alias cd..='cd ..'
alias mkdir='mkdir -pv'
alias ports='netstat -tulanp'
@avandrevitor
avandrevitor / .htaccess
Created December 6, 2016 15:48
Apache Mobile Redirect
# from http://snipplr.com/view/47652/simple-htaccess-mobile-redirect/
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]
@avandrevitor
avandrevitor / Xhprof
Created February 16, 2017 01:27 — forked from psaraiva/Xhprof
Usando o xhprof.
Pegar a pasta xhprof e jogar em /var/www
1. Install dependencies
# aptitude install php5-dev
2. Download xhprof source
$ cd /tmp
$ git clone git://github.com/facebook/xhprof.git
3. Install xhprof PHP extension
@avandrevitor
avandrevitor / .editorconfig
Last active May 11, 2023 05:29 — forked from Konafets/.editorconfig
PSR-2 Editorconfig Template
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# All PHP files MUST use the Unix LF (linefeed) line ending.
# Code MUST use an indent of 4 spaces, and MUST NOT use tabs for indenting.
# All PHP files MUST end with a single blank line.
# There MUST NOT be trailing whitespace at the end of non-blank lines.
[*]
@avandrevitor
avandrevitor / gist:72e7cbc147b4cc483f58d8411c1bef61
Created June 7, 2017 22:36 — forked from tonyoconnell/gist:2351492
Install Magento 1.8 With Sample Data By SSH
mkdir demo
cd demo
wget http://www.magentocommerce.com/downloads/assets/1.8.1.0/magento-1.8.1.0.tar.gz
wget http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sample-data-1.6.1.0.tar.gz
tar -zxvf magento-1.8.1.0.tar.gz
tar -zxvf magento-sample-data-1.6.1.0.tar.gz
mv magento-sample-data-1.6.1.0/media/* magento/media/
mv magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql magento/data.sql
mv magento/* magento/.htaccess .
chmod o+w var var/.htaccess app/etc