Skip to content

Instantly share code, notes, and snippets.

View marcoalbarelli's full-sized avatar

Marco Albarelli marcoalbarelli

  • Infra Lead
  • Verona
View GitHub Profile
### Keybase proof
I hereby claim:
* I am marcoalbarelli on github.
* I am marcoalbarelli (https://keybase.io/marcoalbarelli) on keybase.
* I have a public key ASC4wvbLQOtziGzn_BA4A8v-uxDOOGgOH6rEjjKF6bQ-rAo
To claim this, I am signing this object:
@marcoalbarelli
marcoalbarelli / async_demo.js
Last active March 14, 2019 16:59
async+generators
const g = function* (array) {
for(let e of array) {
yield new Promise((resolve, reject) => {
return setTimeout(()=>{resolve(e)}, 1000)
})
}
}
for(let f of g([1,100,23])) {
f.then(console.log)
const throwing = () => {
throw Error('eee')
}
const throwingAsync = async () => {
throw Error('eee')
}
const rejectingButNotReturning = () => {
return Promise.reject(Error('aaa'))
PHPUnit 4.8.26 by Sebastian Bergmann and contributors.
EE.EEF
Time: 95 ms, Memory: 5.75MB
There were 4 errors:
1) Bazinga\Bundle\HateoasBundle\Tests\DependencyInjection\BazingaHateoasExtensionTest::testLoad
Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: You cannot set service "service_container".