Skip to content

Instantly share code, notes, and snippets.

View rockdrigo's full-sized avatar

Rodrigo Satch rockdrigo

View GitHub Profile
@rockdrigo
rockdrigo / git-alias.md
Created June 5, 2022 20:46 — forked from Klerith/git-alias.md
Useful Git Alias

Log

git config --global alias.lg "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"

Status

git config --global alias.s status --short

Alternativa útil de status

git config --global alias.s status -sb

public class Polinomio{
private int[] coeficientes;
private int grado;
public Polinomio(int g){
if (g < 0) {
coeficientes = new int[1];
coeficientes[0] = 0;
grado = 0;
} else {
@rockdrigo
rockdrigo / mysql.txt
Created November 4, 2015 16:17 — forked from johnantoni/mysql.txt
mysql + vagrant + remote access
username: vagrant
password: vagrant
sudo apt-get update
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev
sudo aptitude install mysql-server mysql-client
sudo nano /etc/mysql/my.cnf
#### Magento Hosting Performance Benchmarks
#### Executed by: JeroenVermeulen.eu / MagentoHosting.pro
## Example test command for 5 concurrent users hitting as fast as possible:
## siege --concurrent=5 --file=urls.txt --log=log.txt --time=60s --quiet --benchmark --internet
## The file urls.txt contains 5029 URLs based on sitemap.xml.
## Magento contains 5933 Total products.
## Magento has 4697 Enabled products.
##

I've had the opertunity to try a variety of different server configurations but never really got around to trying HHVM with Magento until recently. I thought I would share a detailed walkthrough of configuring a single instance Magento server running Nginx + Fast CGI + HHVM / PHP-FPM + Redis + Percona. For the purpose of this blog post I'm assuming you are using Fedora, CentOS, or in my case RHEL 6.5.

Please note: I'm 100% open to suggestions. If you see something I did that needs to be done a different way, please let me know. I haven't included my Perconca my.conf file yet. I will shortly. Also I plan on trying this same test with HHVM 3.3 and PHP 7.

Install the EPEL, Webtatic, and REMI repos

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
; configuration for php Xcache module
[xcache-common]
;; install as zend extension (recommended), normally "$extension_dir/xcache.so"
zend_extension = /usr/lib/php5/20090626/xcache.so
[xcache.admin]
xcache.admin.auth = On
xcache.admin.user = "appadmin"
;xcache.admin.pass = md5(yourpassword)