This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ = window.jQuery = require("jquery") | |
Course = | |
init: -> | |
$('.js-product-overlay').on 'click', (e) => | |
@viewProductClickHandler(e, MediaDetection) | |
@preSelectItemSize() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function it_imports_image_assets( | |
Filesystem $filesystem, | |
EntityManager $entityManager, | |
Finder $finder, | |
SplFileInfo $file1, | |
SplFileInfo $file2 | |
) { | |
$imageImportPath = '/var/www/crmpicco/app/files/images/rfc-1872/'; | |
$filesystem->exists($imageImportPath)->willReturn(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CRMPiccos-MacBook:portfolio crmpicco$ cat ~/.bash_profile | |
alias ll='ls -lG' | |
alias composer="php /usr/local/bin/composer.phar" | |
if [ -f `brew --prefix`/usr/local/git/contrib/completion/git-completion.bash ]; then | |
. `brew --prefix`/usr/local/git/contrib/completion/git-completion.bash | |
fi | |
CRMPiccos-MacBook:portfolio crmpicco$ locate git-completion.bash | |
/usr/local/git/contrib/completion/git-completion.bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* An exception listener to pickup PDOExceptions thrown in the codebase. | |
* | |
* @author Craig R Morton <crmpicco@aol.com> | |
* @date 22-07-2016 | |
*/ | |
namespace AppBundle\EventListener; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isoCodeToCountry($code) | |
{ | |
$code = strtoupper($code); | |
$countryList = array( | |
'AF' => 'Afghanistan', | |
'AX' => 'Aland Islands', | |
'AL' => 'Albania', | |
'DZ' => 'Algeria', | |
'AS' => 'American Samoa', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ("ga" in window) { | |
// we have multiple trackers, one for region and one for global, so we need to iterate over each | |
// tracker and send the event data to each | |
trackers = ga.getAll(); | |
$.each(trackers, function(i, tracker) { | |
if (tracker) { | |
tracker.send('event', category, action, label); | |
} | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$subscriptionRenewalDate = \DateTime::createFromFormat('Y-m-d H:i:s', date('Y-m-d H:i:s', $subscription->currentTermEnd)); | |
$now = new \DateTime('now'); | |
$daysPastDue = $now->diff($subscriptionRenewalDate)->format('%a'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @param string $filepath | |
* @return array | |
*/ | |
private function getBraintreeSubscriptions(string $filepath) : array | |
{ | |
// open the exported Braintree CSV file | |
$subscriptions = []; | |
if (false !== ($handle = fopen($filepath, 'r'))) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="braintree-paypal-loggedin" | |
style=' | |
display: block; | |
max-width: 500px; | |
overflow: hidden; | |
padding: 16px; | |
background-image: url("https://checkout.paypal.com/pwpp/2.15.7/images/paypal-small.svg"), none; | |
background-position: 20px 50%; background-repeat: no-repeat; | |
background-size: 13px 15px; | |
border-top: 1px solid rgb(209, 212, 214); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var paypalButton = document.getElementById('paypal'); | |
var paypalEmail = document.getElementById('bt-pp-email'); | |
var paypalCancel = document.getElementById('braintree-paypal-loggedin'); | |
function displayPrettyPayPal(payload) { | |
paypalEmail.innerHTML = payload.details.email; | |
$('#braintree-paypal-loggedin').fadeIn('slow'); | |
} |
OlderNewer