Skip to content

Instantly share code, notes, and snippets.

View the-nerdery-dot-info's full-sized avatar

Michael Morrissey the-nerdery-dot-info

View GitHub Profile
sudo hdiutil create ~/Documents/case-sensitive.dmg -volname "case-sensitive" -size 10g -fs "Case-sensitive HFS+"
sudo hdiutil mount ~/Documents/case-sensitive.dmg
cd /Volumes/case-sensitive
Let’s assume that new module (app/code/community/NewCustomerAttributeModule) adds new select attribute to customer backend form which is displayed on ‘My Dashboard’ in customer account on Frontend.
We are going to test this attribute while creating customer on Backend.
The following needs to be done:
1) As you added a new namespace, file dev/tests/functional/composer.json should be updated to use it:
"psr-4": {
"Magento\\": ["lib/Magento/", "vendor/magento/mtf/Magento/", "testsuites/Magento/"],
"Mage\\": ["generated/Mage/", "tests/app/Mage/"],
"Enterprise\\": ["generated/Community/", "tests/app/Community/"],
"Community\\": ["generated/Community/", "tests/app/Community/"],
"Test\\": "generated/Test/"
In order to run test on any custom theme first of all you need to update all changed blocks according to new flow. To do this you need
1) create separate theme folder dev/tests/functional/tests/theme/responsive
2) create block that has another behavior then in default theme dev/tests/functional/tests/theme/responsive/Mage/Catalog/Test/Block/Search.php
3) update files autoload in composer.json
"autoload": {
"psr-4": {
"Magento\\": ["lib/Magento/", "vendor/magento/mtf/Magento/", "testsuites/Magento/"],
"Mage\\": ["generated/Mage/", "tests/theme/responsive/Mage/", "tests/app/Mage/"],
"Enterprise\\": ["generated/Community/", "tests/app/Community/"],
@the-nerdery-dot-info
the-nerdery-dot-info / config.xml
Created March 26, 2016 14:35
Magento - adding custom attribute to order
<!--
add this to config.xml to have the attribute automatically
transferred to the order from the quote -> order conversion
Access the attirbute via magic getters/setters
$quote->getYourSpecialAttribute()
$order->getYourSpecialAttribute()
$quote->setYourSpecialAttribute()
-->
@the-nerdery-dot-info
the-nerdery-dot-info / reloadEnv.ps1
Created January 25, 2016 06:13
reload windows environment variables
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
@the-nerdery-dot-info
the-nerdery-dot-info / setup.ps1
Created January 25, 2016 05:44 — forked from ferventcoder/setup.ps1
Really rocking out the environment setup
$scriptDir = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
function Install-NeededFor {
param(
[string] $packageName = ''
,[bool] $defaultAnswer = $true
)
if ($packageName -eq '') {return $false}
$yes = '6'
<?php
/**
* Script to manage to version of Magento in a git mirror
* php $argv[0] core-repository new-version-of-magento
*
* It will look for Mage.php in new-version-of-magento and parse the version
* and edition from it.
*
* It will copy the code, remove the old files, create new branches if necessary
@the-nerdery-dot-info
the-nerdery-dot-info / ps-export-layers-to-png.jsx
Created December 8, 2015 12:35 — forked from tomekc/ps-export-layers-to-png.jsx
Photoshop script that exports to PNG all layers and groups whose names end with ".png".
#target photoshop
// $.level = 2;
/*
* Script by Tomek Cejner (tomek (at) japko dot info)
* based on work of Damien van Holten:
* http://www.damienvanholten.com/blog/export-groups-to-files-photoshop/
*
* My version adds support of nested layer groups,
* and exports single layers in addition to groups.
@the-nerdery-dot-info
the-nerdery-dot-info / rails_resources.md
Last active August 29, 2015 14:18 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@the-nerdery-dot-info
the-nerdery-dot-info / css_resources.md
Last active August 29, 2015 14:18 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides