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 declare(strict_types = 1); | |
namespace App\Core\DependencyInjection\Extension; | |
use App\Core\Service\Serializer; | |
/** | |
* Extends the class with awareness of Serializer service | |
* | |
* Created for free for the anarchist movement around the world. |
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
.SILENT: | |
# Colors | |
COLOR_RESET = \033[0m | |
COLOR_INFO = \033[32m | |
COLOR_COMMENT = \033[33m | |
## This help screen | |
help: | |
printf "${COLOR_COMMENT}Usage:${COLOR_RESET}\n" |
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 declare(strict_types=1); | |
/* | |
* Doctrine auto-mapping | |
*/ | |
if (!function_exists('generateDoctrineMappings')) { | |
function generateDoctrineMappings(): array | |
{ | |
$domains = glob(__DIR__ . '/../../src/Domain/*/Entity'); |
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
root@fbda086ffd7e:/# resolve_stack_dump -s ./mysql.sym -n ./mysql.stack | |
0x7aa245 my_print_stacktrace + 53 | |
0x677123 handle_fatal_signal + 1027 | |
0x7f74a5510890 _end + -1537442712 | |
0x8a7b5a dict_table_check_foreign_keys + 343050 | |
0x824f51 _ZN21ha_innobase_add_indexD0Ev + 391329 | |
0x828c46 _ZN21ha_innobase_add_indexD0Ev + 406934 | |
0x855f49 dict_table_check_foreign_keys + 8185 | |
0x85ad20 dict_table_check_foreign_keys + 28112 | |
0x845321 _ZN21ha_innobase_add_indexD0Ev + 523377 |
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 | |
protected function mockFormValidationToReturnValid(): void | |
{ | |
$form = $this->createMock(FormInterface::class); | |
$form->method('isValid')->willReturn(true); | |
$factory = $this->createMock(FormFactoryInterface::class); | |
$factory->method('create')->willReturn(FormInterface::class)->willReturn($form); | |
$this->getContainer()->set('form.factory', $factory); |
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 declare(strict_types=1); | |
class SomeThing | |
{ | |
private function getClassTraitNames(string $className = null): array | |
{ | |
if ($className === null || !class_exists($className)) { | |
return []; | |
} |
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
#!/bin/bash | |
if [[ ! -f /var/lib/mysql/ibdata1 ]]; then | |
cd /usr/local/mysql/ | |
mysql_install_db --user=mysql --ldata=/var/lib/mysql | |
fi | |
echo " >> Starting MySQL from /var/lib/mysql" | |
exec mysqld --datadir=/var/lib/mysql |
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
import tornado.web | |
# | |
# Created for Anarchist movement | |
# | |
# http://iwa-ait.org | |
# http://zsp.net.pl | |
# |
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
from tornado import web | |
import tornado | |
import tornado.httpclient | |
import tornado.httputil | |
import logging | |
from .BaseController import BaseHandler | |
logger = logging.getLogger('tornado_proxy') |
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
#!/bin/bash | |
printf " >> Pulling all base images\n" | |
for image_name in $$(cat ./containers/*/Dockerfile | grep -E "FROM (.*)" | sed -e 's/FROM //g'); do \ | |
echo " >> Pulling $$image_name"; \ | |
sudo docker pull "$${image_name}"; \ | |
done | |
printf " >> Pulling images from docker-compose\n" | |
sudo docker-compose pull |