Skip to content

Instantly share code, notes, and snippets.

View loevgaard's full-sized avatar

Joachim Løvgaard loevgaard

View GitHub Profile
@loevgaard
loevgaard / Product.php
Created January 29, 2018 08:30
Update one to many relationship
<?php
namespace Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity()
* @ORM\Table()
@loevgaard
loevgaard / moneyStringToNumber.js
Last active August 23, 2017 12:50
A JavaScript function that takes a 'money' string and converts it to a number
/**
* Takes strings like
* - 1000,50
* - 1000.50
* - EUR 1000,50
* - 1000,50 EUR
*
* And converts them to 1000.50
* @param {string} str