Skip to content

Instantly share code, notes, and snippets.

brew update
brew cask install qlcolorcode
brew cask install qlstephen
brew cask install qlmarkdown
brew cask install quicklook-json
brew cask install qlprettypatch
brew cask install quicklook-csv
brew cask install betterzipql
brew cask install webpquicklook
@bordeo
bordeo / new_mac_web_developer.sh
Last active March 8, 2018 08:41
New Mac Web developer
#LAST EDIT 18/07/2017
#
# CHANGELOG
#
# * 18/07/2017 update docker images, port bind and mount dir
#
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@bordeo
bordeo / price.phtml M1.9
Last active November 16, 2015 09:16 — forked from hans2103/price.phtml M1.9
Implementation of structured data itemprop=price on app/design/frontend/<your_package>/<your_theme>/template/catalog/product/price.phtml - Magento 1.9.0.x - http://schema.org/Offer - more information: http://www.byte.nl/blog/magento-rich-snippets-made-easy/
<?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
@bordeo
bordeo / xdebug.ini
Created November 17, 2015 08:35
Xdebug Configuration file
[xdebug]
zend_extension="/usr/local/opt/php56-xdebug/xdebug.so"
xdebug.remote_enable=on
xdebug.remote_port=10000
xdebug.remote_mode=req
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.idekey="PHPSTORM"
xdebug.remote_log="/usr/local/var/log/apache2/xdebug_remote.log"
xdebug.remote_autostart=0
@bordeo
bordeo / magentotools.sh
Created November 17, 2015 08:43
Developer tools
bash < <(wget -q --no-check-certificate -O - https://raw.github.com/colinmollenhour/modman/master/modman-installer)
curl -sS https://getcomposer.org/installer | php
@bordeo
bordeo / .extra
Last active July 11, 2016 07:41
Extra file for dotfiles
alias restart_httpd24='sudo brew services restart httpd24'
alias restart_mysql='brew services restart mysql'
alias composer='COMPOSER_DISABLE_XDEBUG_WARN=1 php -d xdebug.remote_enable=0 -d xdebug.default_enable=0 -d xdebug.profiler_enable=0 ~/bin/composer $*'
# Git credentials
# Not in the repository, to prevent people from accidentally committing under my name
GIT_AUTHOR_NAME="bordeo"
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
git config --global user.name "$GIT_AUTHOR_NAME"
GIT_AUTHOR_EMAIL="[email protected]"
@bordeo
bordeo / ETC.php
Created November 17, 2015 13:33
Estimate Time to Completion
<?php
/**
* This class provides the methods to calculate the estimated time to completion
* (or ETC) for a iterated procedure, by passing the numer of iterations you will do.
*
* -----------------------------------------------------------------------------
* Example of usage:
* $timer = new ETC(number of iterations you have);
*
@bordeo
bordeo / command.txt
Last active September 8, 2016 14:09
Comman Line Usefull
********** LP ********
folder skin images
glue-sprite sprites --css ../css/ --img ./ --ratios=2,1.5,1
folder skin css
sass-convert --from css --to scss sprites.css sprites.scss
*********
****get list for purge cache
**on root project folder
find media/css -name *.css
@bordeo
bordeo / mysqldump-magento.sh
Last active November 20, 2015 15:10
Mysql Dump for magento exluding data for index, log, report
#!/bin/sh
USER=$1
PASS=$2
DB=$3
if [ -z $DB ];
then
echo "\n"
echo "Usage: mysqldump-magento.sh user password database\n"
@bordeo
bordeo / magento_add_admin_user.sql
Created November 28, 2015 10:16
Create admin user in magento
LOCK TABLES `admin_role` WRITE , `admin_user` WRITE;
SET @SALT = "rp";
SET @PASS = CONCAT(MD5(CONCAT( @SALT , "password") ), CONCAT(":", @SALT ));
SELECT @EXTRA := MAX(extra) FROM admin_user WHERE extra IS NOT NULL;
INSERT INTO `admin_user` (firstname,lastname,email,username,password,created,lognum,reload_acl_flag,is_active,extra,rp_token_created_at)
VALUES ('Firstname','Lastname','[email protected]','admin',@PASS,NOW(),0,0,1,@EXTRA,NOW());
INSERT INTO `admin_role` (parent_id,tree_level,sort_order,role_type,user_id,role_name)