Skip to content

Instantly share code, notes, and snippets.

View r8or0pz's full-sized avatar
🎯
Focusing

Roman Borysenko r8or0pz

🎯
Focusing
View GitHub Profile
<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
<?php
namespace App\Form;
use App\Entity\VehicleRegisteredType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
<?php
namespace BackendLib\EventListener;
use Doctrine\ORM\Event\LifecycleEventArgs;
use Doctrine\ORM\Event\PreUpdateEventArgs;
use BackendLib\Entity\iEmbeddedEntityRelationFixable;
use BackendLib\Annotation\EmbeddedEntityRelationFixer;
use Doctrine\Common\Annotations\Reader;
use Doctrine\Common\Inflector\Inflector;
docker inspect --format {{.LogPath}} <containerid> # Return Docker log path
num_lines = sum(1 for line in open('myfile.txt'))
#!/bin/bash
# Wait until it's up
until curl host:port &>/dev/null; do
sleep 1
done
#!/bin/bash
# Wait until it's up
until curl host:port &>/dev/null; do
sleep 1
done
version: '3'
networks:
flask:
services:
flask:
image: webapp-flask
build:
context: .
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
dev tun
persist-tun
persist-key
cipher AES-256-CBC
ncp-ciphers ...
auth SHA256
tls-client
client
resolv-retry infinite
remote xx.xx.xxx.xxx 1195 udp