Skip to content

Instantly share code, notes, and snippets.

View rickbenetti's full-sized avatar

Rick Benetti rickbenetti

View GitHub Profile
# Write a /etc/sudoers on OS X for vagrant 1.7.3 and above with these entries:
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports
Cmnd_Alias VAGRANT_NFSD = /sbin/nfsd restart
Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /usr/bin/sed -E -e /*/ d -ibak /etc/exports
%admin ALL=(root) NOPASSWD: VAGRANT_EXPORTS_ADD, VAGRANT_NFSD, VAGRANT_EXPORTS_REMOVE
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@rickbenetti
rickbenetti / gist:0ad45b9e7961b2064a83
Created October 6, 2015 22:14 — forked from taylorotwell/gist:db67dd369b00022850b4
Mac Yosemite Dev Machine Setup

XCode

  • Install XCode from App Store.
  • Open XCode and agree to terms and conditions.

XCode CLI Tools

  • xcode-select --install

Install Homebrew

@rickbenetti
rickbenetti / price.phtml
Last active September 18, 2015 03:33 — forked from jasontipton/price.phtml
Adding 'hreview-aggregate' Microformat - Magento 1.9 Community Edition
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
# Encrypt the repository
# Remove/modify this line if the repository is meant to be open-source
*.* filter=git-crypt diff=git-crypt
.gitattributes !filter !diff
# These files are text and should be normalized (Convert crlf => lf)
*.php text
*.phtml text
*.css text
*.js text
# I like tunning the colors of the prompt in the first place:
export CLICOLOR='true'
export LSCOLORS="gxfxcxdxbxCgCdabagacad"
export EDITOR=vi
# Git branch in good-looking prompt.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
@rickbenetti
rickbenetti / install-rbenv-ruby
Created December 9, 2014 19:01
Install Ruby on ubuntu
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
@rickbenetti
rickbenetti / lamp-config
Created December 9, 2014 17:44
LAMP préconfiguração
$ sudo apt-get install git apache2 php5 libapache2-mod-php5 php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl mysql-server mysql-client phpmyadmin snmp-mibs-downloader php-pear -y;
$ sudo pear install PHP_CodeSniffer;
------(not recomend)--------
$ sudo pear channel-discover pear.pdepend.org;
$ sudo pear install pdepend/PHP_Depend-1.1.4;
$ sudo pear channel-discover pear.phpmd.org;
$ sudo pear install phpmd/PHP_PMD-1.5.0;
--------------------------------------------------
<?php echo $this->getLayout()->createBlock('enterprise_banner/widget_banner')->setBannerIds('4')->setDisplayMode('fixed')->setTemplate('banner/widget/block.phtml')->toHtml(); ?>
@rickbenetti
rickbenetti / default-web-fonts.txt
Created September 9, 2014 16:06
Padrões de fontes para uso em sites e e-mail marketins.
font-family: Arial, Helvetica, sans-serif;
font-family: ‘Arial Black’, Gadget, sans-serif;
font-family: ‘Bookman Old Style’, serif;
font-family: ‘Comic Sans MS’, cursive;
font-family: Courier, monospace;
font-family: ‘Courier New’, Courier, monospace;
font-family: Garamond, serif;
font-family: Georgia, serif;
font-family: Impact, Charcoal, sans-serif;
font-family: ‘Lucida Console’, Monaco, monospace;