Skip to content

Instantly share code, notes, and snippets.

View crmpicco's full-sized avatar
🏴󠁧󠁢󠁳󠁣󠁴󠁿
Blahem

Craig R Morton crmpicco

🏴󠁧󠁢󠁳󠁣󠁴󠁿
Blahem
View GitHub Profile
@crmpicco
crmpicco / isoCodeToCountry.php
Created August 16, 2017 15:34
isoCodeToCountry
function isoCodeToCountry($code)
{
$code = strtoupper($code);
$countryList = array(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
@crmpicco
crmpicco / PdoExceptionListener.php
Created July 22, 2016 06:04
An exception listener to pickup PDOExceptions thrown in the codebase.
<?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;
@crmpicco
crmpicco / .bash_profile
Created July 8, 2016 07:32
Git autocomplete on Mac OSX El Capitan
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
@crmpicco
crmpicco / ImpageImporterSpec.php
Created March 3, 2016 13:39
it_imports_image_assets
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);
@crmpicco
crmpicco / course.coffee
Created January 8, 2016 13:30
CoffeeScript Scoping Issue
$ = window.jQuery = require("jquery")
Course =
init: ->
$('.js-product-overlay').on 'click', (e) =>
@viewProductClickHandler(e, MediaDetection)
@preSelectItemSize()