Skip to content

Instantly share code, notes, and snippets.

View matthewfitz's full-sized avatar

Matt Fitzgerald matthewfitz

View GitHub Profile
<?php
require 'path-to-Stripe.php';
if ($_POST) {
Stripe::setApiKey("YOUR-API-KEY");
$error = '';
$success = '';
try {
if (!isset($_POST['stripeToken']))
throw new Exception("The Stripe Token was not generated correctly");
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') }}',