Skip to content

Instantly share code, notes, and snippets.

View astrotars's full-sized avatar
⛰️

Nick Parsons astrotars

⛰️
View GitHub Profile
@astrotars
astrotars / .bash_profile
Created September 24, 2012 17:53
OSX Bash Profile
PS1='\w$ '
alias staging-mysql='pagoda -a aisle5-staging tunnel -c db1'
alias staging-redis='pagoda -a aisle5-staging tunnel -c cache1'
alias production-mysql='pagoda -a aisle5 tunnel -c db1'
alias production-redis='pagoda -a aisle5 tunnel -c cache1'
alias redis='redis-server'
alias redis-web='resque-web -p 8282 -F -r localhost:6379'
@astrotars
astrotars / gist:3777427
Created September 24, 2012 18:17
pagoda
---
:username: cbranch101
:u: cbranch101
:a:
:app:
:password: YOUR_PASSWORD
commands:
:info: {}
:rollback: {}
@astrotars
astrotars / .gitmodules
Created October 24, 2012 15:26
Git Submodules
[submodule "secure/vendor/fb-chartinator"]
path = secure/vendor/fb-chartinator
url = git@github.com:Movement-Strategy/fb-chartinator.git
[submodule "secure/vendor/fb-user-scraper"]
path = secure/vendor/fb-user-scraper
url = git@github.com:Movement-Strategy/fb-user-scraper.git
[submodule "secure/vendor/php-cloudfiles"]
path = secure/vendor/php-cloudfiles
url = git://github.com/rackspace/php-cloudfiles.git
[submodule "secure/vendor/php-mongorm"]
[02-Nov-2012 19:31:15 UTC] PHP Fatal error: SimpleExcel\{closure}(): Failed opening required '/var/www/secure/vendor/simple_excel_php/src/SimpleExcel/.php' (include_path='.:/usr/lib/php-5.3.10/php:../secure/libs:../secure/vendor:../secure/models:../secure/controllers:../secure/modules') in /var/www/secure/vendor/simple_excel_php/src/SimpleExcel/SimpleExcel.php on line 43
ORM::for_table('orders')
->select('users.fb_uid')
->select('order_items.quantity')
->join('users', array('users.id', '=', 'orders.user_id'))
->join('user_settings', 'user_settings.user_id', '=', 'orders.user_id')
->join('order_items', 'order_items.order_id', '=', 'orders.id')
->where('order_items.deleted', false)
->where('user_settings.store_id', $store_id)
->find_many();
if(strlen($row['coupon_code']) > 0){
// assign the coupon code value to variable
$coupon_code = $row['coupon_code'];
// build sql to get division code
$division_code = "SELECT
src.code AS coupon_code,
sr.name AS coupon_name
FROM salesrule_coupon src
@astrotars
astrotars / .gitignore
Created December 4, 2012 18:33
Allows for empty directory in GIT repository.
# Ignore everything in this directory
*
# Except this file
!.gitignore
success: function() {
clearInterval(this.options.timerModel.i);
$(this.el).html(create(
['.complete', [
['h3', 'thanks! your order has been placed.'],
['p', [
You cannot define a correlation name 'color_range_idx' more than once
Trace:
#0 /var/www/vhosts/hatclub.com/lib/Varien/Db/Select.php(281): Zend_Db_Select->_join('inner join', Array, 'color_range_idx...', Array, NULL)
#1 /var/www/vhosts/hatclub.com/lib/Zend/Db/Select.php(336): Varien_Db_Select->_join('inner join', Array, 'color_range_idx...', Array, NULL)
#2 /var/www/vhosts/hatclub.com/lib/Zend/Db/Select.php(315): Zend_Db_Select->joinInner(Array, 'color_range_idx...', Array, NULL)
#3 /var/www/vhosts/hatclub.com/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Attribute.php(70): Zend_Db_Select->join(Array, 'color_range_idx...', Array)
#4 /var/www/vhosts/hatclub.com/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php(94): Mage_Catalog_Model_Resource_Layer_Filter_Attribute->applyFilterToCollection(Object(Mage_Catalog_Model_Layer_Filter_Attribute), '48')
#5 /var/www/vhosts/hatclub.com/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php(91): Mage_Catalog_Model_Layer_Filter_Attribute->apply(Obj
{
email: 'nick@movementstrategy.com',
data: {
first_name: 'Nick',
last_name: 'Parsons
}
}