Skip to content

Instantly share code, notes, and snippets.

Steve Ross steve-ross

Block or report user

Report or block steve-ross

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:8741489
Tory Burch Abitha Flip Flops These leather <a style=""text-decoration:none;"" href=""/tory-burch-shoes-sandals-all/br/v=1/2534374302075716.htm"">Tory Burch sandals</a>
View gist:8853341
> db.products.findOne({sourceid: 'INDAH40160'})
{
"_id" : ObjectId("52f3d868b4932d0fc100218b"),
"brandname" : "Indah",
"categories" : [
"Apparel",
"Womens",
"Dresses",
"Day"
],
View gist:9763322
$ids = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('entity_id')
->addFieldToFilter('status', array('eq'=>'1'))
->addFieldToFilter('type_id', array('in'=>array('configurable', 'simple')))
->getAllIds();
View git_fish_prompt.fish
function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
end
function _unpushed
@steve-ross
steve-ross / gist:9956896
Last active Aug 29, 2015
Mage, getting standard db connection
View gist:9956896
// instead of the following:
// db variables
$dsn = 'the dsn hard coded';
$username = 'username hard coded';
$password = 'password hard coded';
// try to connect to the db
try {
$db = new PDO($dsn, $username, $password);
@steve-ross
steve-ross / tar_mage_directory.sh
Last active Aug 29, 2015
Magento Tar Directory Script
View tar_mage_directory.sh
#!/bin/bash
echo "////////////////////////// MAGENTO TAR ////////////////////////////"
date
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
excludefilename="$DIR/exclude_files.txt"
day=$(date +%A)
path=$1
@steve-ross
steve-ross / mysql_dump_mage.sh
Created Apr 3, 2014
Mysql Dump Magento DB script
View mysql_dump_mage.sh
#!/bin/bash
echo "////////////////////////// START ////////////////////////////"
date
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
day=$(date +%A)
user=$2
host=$1
database=$3
View gist:9957350
$j(document).ready(function () {
// enable strict mode
'use strict';
// hide the site newsletter modal
$j('.signup-form').hide();
var check_url = 'http://' + host + '/skin/frontend/enterprise/rebeccaminkoff/inc/sanity-check.php';
var save_url = 'http://' + host + '/skin/frontend/enterprise/rebeccaminkoff/inc/store-address.php';
function get_newsletter_signup_data(){
@steve-ross
steve-ross / signup.js
Created Apr 14, 2014
signup form changes
View signup.js
$j(document).ready(function () {
// enable strict mode
'use strict';
// hide the site newsletter modal
$j('.signup-form').hide();
$j('.footer .last a').attr('onclick', ''); // remove the newsletter click event
$j('.discount-modal').remove();
var pathArray = window.location.href.split('/');
var host = pathArray[2];
View test.php
<?php
define('__CURRENTDIR__', dirname(dirname(__FILE__)));
define('__MAGE__', str_replace('/code/local/GaugeInteractive/EbayMipIntegration', '/Mage.php', __CURRENTDIR__));
require_once(__MAGE__);
Mage::app('default');
Mage::register('isSecureArea', 1);
You can’t perform that action at this time.