Added the getApiEndpoint()
method and overrode the uspsSubmitRequest()
method in the Helper/Data.php
. Basically cheating like crazy to get the domain name and it's IP address so our server will use that instead of the humanized domain name. This is a bandaid approach specific to our client and their internal DNS issues, so I wouldn't suggest using that getApiEndpoint()
method unless absolutely necessary.
Cherry pick multiple commits from a remote or upstream branch into your local branch.
Saw this from a comment on an answer on Stack Overflow
git fetch upstream
git cherry-pick A^..B
$ cat ~/.ssh/id_rsa.pub | ssh USER@HOST "mkdir -p ~/.ssh; cat >> ~/.ssh/authorized_keys; chmod 700 ~/.ssh; chmod 600 ~/.ssh/authorized_keys"
Recently had a client that wanted to customize the layout for a category landing page so that the category's title and description would be displayed above the layered navigation and product grid — essentially creating a full-width section above the left sidebar and main content areas.
NOTE: For reference, this is based off the blog post from Collaboration133.com's Magento - Add Custom Structural Block Reference.
I created a custom module to help organize and identify that there are some custom modifications to layout templates. Not saying you have to, but it may be easier for other's (or your future self) to recognize and find what customizations were done (and hopefully why).
I always forget the steps, but it's pretty simple:
Steps:
- Download the IonCube Loaders
- Check your PHP version to find which IonCube loader you should use
- Check your PHP configuration for the
extension_dir
- Copy the IonCube Loader into the PHP extension directory
For helpful resources on overriding Magento controllers, blocks, models, helpers, etc. see Josh Pratt's post on Magento: Overriding Core Files (Blocks, Models, Resources, Controllers)
Here's a list of search results that I've found most helpful; otherwise good luck with the Googling!
// Post repeat directive for logging the rendering time | |
angular.module('myApp').directive('postRepeatDirective', | |
['$timeout', | |
function($timeout) { | |
return function(scope) { | |
if (scope.$first) | |
window.a = new Date(); // window.a can be updated anywhere if to reset counter at some action if ng-repeat is not getting started from $first | |
if (scope.$last) | |
$timeout(function(){ | |
console.log("## DOM rendering list took: " + (new Date() - window.a) + " ms"); |
# Install `dnsmasq` and configure for *.dev domains | |
$ brew install dnsmasq | |
$ vim /usr/local/etc/dnsmasq.conf | |
# Reload configuration and clear cache | |
$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
$ dscacheutil -flushcache |