Skip to content

Instantly share code, notes, and snippets.

View matthewfitz's full-sized avatar

Matt Fitzgerald matthewfitz

View GitHub Profile
public function putImage($file,$uri) {
$fp = fopen($file, "rb");
$filesize = filesize($file);
$info = getimagesize($file);
$input = $this->inputResource($fp, $filesize);
$requestHeaders = array('Content-Type' => $info['mime']);
if ($this->putObject($input, $this->_bucketName, $uri, \Amazon\S3::ACL_PUBLIC_READ, array(), $requestHeaders)) {
return TRUE;
}
return FALSE;
<?php
namespace Application\AccountsBundle\Listeners;
use OpenSky\IdentityBundle\Listeners\IdentityListener as BaseIdentityListener;
class IdentityListener extends BaseIdentityListener
{
public function getReferencesToIgnore()
{
interapp.config:
apps:
search:
host: http://search.theopenskyproject.com
routes:
searchHome: /search
defaultSearch: /search/:search
distributedCart:
host: https://checkout.theopenskyproject.lcl
routes:
<VirtualHost *:80>
ServerName theopenskyproject.dev
ServerAlias www.theopenskyproject.dev
ServerAdmin matthewfitz@gmail.com
LogLevel warn
ErrorLog /home/matt/apps/logs/apache2/error_log-www.theopenskyproject.dev
DocumentRoot /home/matt/apps/magento_simple
<Directory />
+ www
+ apache_configs
+ checkout
+ data_repository
+ src
+ tests
+ vendor
+ web
swift.mailer:
transport: gmail # can be any of smtp, mail, sendmail, or gmail
username: tirnanog06@gmail.com
password: xxxxxxxx1
_gaq.push(['ShopOpenSkyTracker._trackPageview', 'your_mom']);
_gaq.push(['ShopOpenSkyTracker._trackPageview', 'is_on_speed_dial']);

Im forking this so its in my history

Some rules

Configs exist in three levels:

  1. local
  2. dev | stg | prod
  3. default (no environment)
{% if thankspage %}
// Transaction
_gaq.push(['ShopOpenSkyTracker._addTrans',
'{{ order.orderNumber|escape('js') }}',
'{{ _view.user.getAttribute('checkout/referrerName')|escape('js') }}',
'{{ order.grandTotal|escape('js') }}',
'{{ order.taxAmount|escape('js') }}',
'{{ order.shippingAmount|escape('js') }}',
'{{ order.billingAddress.city|escape('js') }}',
'{{ order.billingAddress.state|escape('js') }}',
URL: https://api.madmimi.com/mailer
Request Options: promotion_name=customer_confirm_join&body=---%0Aemail%3A+matthewfitz%40gmail.com%0Afirstname%3A+Matthew%0Alink%3A+%3E%0A++http%3A%2F%2Fwww.shopopensky.lcl%2Faccounts_dev.php%2Faccount%2Fconfirm%2FM2QwODRkOTZhMTU4M2IzODkzOGIxZDg0OTM5ZmYyZTY%3D%0A&username=matt%40theopenskyproject.com&api_key=04908da3643e715908ae294f20b1091a
Error Code
can't convert nil into String