Skip to content

Instantly share code, notes, and snippets.

Szczepan Cieślik beregond

View GitHub Profile
View Params
@pytest.fixture(scope=module)
def heavy_fixture(fixture1, fixture2):
# here be dragons
@pytest.mark.parametrize(
['param1', 'param2', 'param3'],
[
(1, 0, 0),
(0, 1, 1),
View gist:9616272
set nofoldenable
set title
let g:syntastic_python_checkers=['python', 'pylama', 'py3kwarn']
au BufEnter * set cc=80
@beregond
beregond / response.json
Created Jan 3, 2014
[devlog] API response example 4.
View response.json
{
"data2": "testa",
"data3": "guess who is missing?",
"some_metadata": {
"foo": ["baz", "bar"]
},
"version": "2.0"
}
@beregond
beregond / response.json
Created Jan 3, 2014
[devlog] API response example 3.
View response.json
{
"data": "chuck",
"data2": "testa",
"some_metadata": {
"foo": ["baz", "bar"]
},
"version": "1.3"
}
@beregond
beregond / response.json
Created Jan 3, 2014
[devlog] API response example 2.
View response.json
{
"data2": "testa",
"data3": "guess who is missing?",
"some_metadata": {
"foo": ["baz", "bar"]
}
}
@beregond
beregond / response.json
Last active Jan 2, 2016
[devlog] API response example 1.
View response.json
{
"data": "chuck",
"data2": "testa",
"some_metadata": {
"foo": ["baz", "bar"]
}
}
@beregond
beregond / gist:4373142
Last active Jul 30, 2019
Allows to abandon necessity to define all setters and getters in Doctrine's entities (works perfectly with Symfony + Doctrine + Twig).
View gist:4373142
<?php
namespace Vendor\TestBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* Gneral class for all entities.
*/
@beregond
beregond / TemporaryFiles.php
Created Jul 14, 2012
Classes to help handle temporary files (also creation of such, but also 'checking' files to be removed after scripts end).
View TemporaryFiles.php
<?php
/**
* File contains two classes to help maintaining temporary files (especially problem of
* cleaning up such files) - FileToRemove and TemporaryFile.
*
* Requires PHP >= 5.3.0 (tested with 5.3.10-1)
*/
namespace Vendorname;
You can’t perform that action at this time.