Skip to content

Instantly share code, notes, and snippets.

Go to https://analytics.google.com
#Step1
-Create an account
-Create a property
-Create a view named "Global"
#Step2
Create a view named "site.com"
Go to filters and create new one with
jQuery.noConflict()
if Prototype.BrowserFeatures.ElementExtensions
disablePrototypeJS = (method, pluginsToDisable) ->
handler = (event) ->
event.target[method] = undefined
setTimeout ->
delete event.target[method]
return
@bordeo
bordeo / composer_redeploy.sh
Created January 29, 2016 11:51
Trigger composer deploy of local module
composer run-script post-install-cmd -vvv -- --redeploy
@bordeo
bordeo / brew_cask_update_all.sh
Created January 24, 2016 09:57
Update all cask in you Mac
brew cask list | xargs brew cask install --force
@bordeo
bordeo / envsettingstoolExport.sql
Created December 9, 2015 15:58
Env settings tool export csv
SELECT
"Est_Handler_Magento_CoreConfigData" AS handler,
scope AS param1,
scope_id AS param2,
path AS param3,
"" AS groups,
`value` AS `default`,
'' AS devbox,
'' AS deploy,
'' AS latest,
@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)
@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 / 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 / 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);
*