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 / 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
@avandrevitor
avandrevitor / .gitconfig
Created June 27, 2017 13:29 — forked from jvandyke/.gitconfig
Use PHPStorm/WebStorm for git diff and merge tools
# ~/.gitconfig
# Add this to your global git configuration file
# Change phpstorm to webstorm, if you use that.
# Diff and merge tool changes
# Run `git difftool <directory/file>...` or `git mergetool <directory/file>...`
[merge]
tool = phpstorm
[diff]
tool = phpstorm
@avandrevitor
avandrevitor / Zsh & theme
Created September 20, 2017 17:07 — forked from leemour/Zsh & theme
Zsh installation and Agnoster theme settings
# Railscast
http://railscasts.com/episodes/308-oh-my-zsh
# Install Zsh
sudo apt-get update && sudo apt-get install zsh
# Install Oh-my-zsh
wget –no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O – | sh
# Make ZSH default shell
@avandrevitor
avandrevitor / ca.md
Created December 26, 2017 12:12 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@avandrevitor
avandrevitor / gist:6d1fdf7a4e12ca506945208df11a97d6
Created January 13, 2018 15:54 — forked from rmetzler/gist:2947828
find all non UTF-8 encoded files
find . -type f | xargs -I {} bash -c "iconv -f utf-8 -t utf-16 {} &>/dev/null || echo {}" > utf8_fail
@avandrevitor
avandrevitor / find.repo.biggest.files
Created April 30, 2018 12:42 — forked from nmussat/find.repo.biggest.files
Find biggest files from a Git repository
#!/bin/bash
# Find biggest files from a Git repository
# See http://progit.org/book/ch9-7.html
MAX_FILES=20
LINES=`git verify-pack -v .git/objects/pack/pack-*.idx | grep blob | sort -k 3 -n | tail -${MAX_FILES}`
IFS=$'\n'
for LINE in $LINES
do
@avandrevitor
avandrevitor / composer-private-package-github-token.md
Created May 7, 2018 17:10 — forked from jeffersonmartin/composer-private-package-github-token.md
Generate a GitHub Personal Access Token for Private Composer Packages

Generate a GitHub Personal Access Token for Private Composer Packages

If you're trying to load a private repository with Composer/Laravel, we'll need to generate a GitHub Personal Access Token (similar to OAuth token) to access the repository during a composer install without entering credentials.

If you have used other Github packages from {my-org} before, you may be able to skip this step.

  1. Visit https://github.com/settings/tokens.

  2. Click Generate new token.

@avandrevitor
avandrevitor / generate_docker_cert.sh
Created August 13, 2018 12:08 — forked from bradrydzewski/generate_docker_cert.sh
Generate trusted CA certificates for running Docker with HTTPS
#!/bin/bash
#
# Generates client and server certificates used to enable HTTPS
# remote authentication to a Docker daemon.
#
# See http://docs.docker.com/articles/https/
#
# To start the Docker Daemon:
#
# sudo docker -d \