Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
if [[ -n $PASS_SSH ]]
then
apt-get install -y ssh
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && (echo $PASS_SSH; echo $PASS_SSH) | passwd root
service ssh start
fi
if [[ -n $SSH_KEY ]]
then
#!/bin/bash
# By Josh_Lopes (https://t.me/JoshLopes)
source $HOME/.bashrc
TZ=utc
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
apt-get update
apt-get upgrade -y
apt-get install -y sudo nano wget tar zip unzip jq ssh
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
mkdir -p $HOME/.ssh

Keybase proof

I hereby claim:

  • I am joshlopes on github.
  • I am tedcrypto (https://keybase.io/tedcrypto) on keybase.
  • I have a public key ASD7sr4hqX2b9LSGxrWKi2OMnz_LmKdfr2fOY8w4Os7vFwo

To claim this, I am signing this object:

Chat started on 18 Oct 2019, 08:56 AM (GMT+0)
(08:56:38) *** Visitor 75586647 joined the chat ***
(08:56:38) Visitor 75586647: Problem with dispatch. Help.
(09:15:22) Jose: zzzzzz
(09:15:29) Jose: I am gonna wait
(09:22:57) Jose: Still waiting!!!!!!
(09:23:19) Jose: The person that is front of me MUST HAVE A LOT OF QUESTIONS! for a single support person!!!!!!!!!
(09:28:50) Jose: let's start counting the time shall we? so i've opened my request at 9h30 - is now 10h28
(09:51:21) Jose: Still waiting -- 10h51
(10:09:01) Jose: 11h10
class ExampleTest extends BaseTestCase
{
public function testA()
{
$contact1 = new Contact();
$contact2 = new Contact();
$this->prophesize();
$mockB = $this->prophesize(B::class);
<?php
declare(strict_types=1);
namespace App\Bridge\Symfony\Serializer;
use App\Serializer\ModelDenormalizeInterface;
use App\Serializer\ModelNormalizerInterface;
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer as SymfonyObjectNormalizer;
/**
* @Given /^I should see a table with:$/
*/
public function iShouldSeeTableWith(TableNode $expectedTable)
{
$expectedArray = $expectedTable->getColumnsHash();
$currentArray = [];
$tables = $this->getSession()->getPage()->findAll('css', 'table');
/** @var NodeElement $table */
foreach ($tables as $table) {
@joshlopes
joshlopes / amara-quiz-questions.yml
Created December 5, 2017 14:05
Questions for amara quiz, the first option will always be the correct one. The options will be shuffled when creating the game!
- title: 10%% of women have something with them all the time on their bag, what?
options:
- Notebook
- Tissues
- Pepper spray
- Chocolate
- title: According to 74%% of people there is one thing you shouldn't do at all in your work place. What?
options:
- Cry
- Use facebook
# services.yml
app.some_service:
class: SomeService
calls:
- [setSomeOtherService, ['@app.someOtherService']
# Test
function doSomethingWithOtherService()
{
$mockedOtherService = $this->prophesize(SomeOtherService::class);
public function editAction(Request $request, DeliveryZone $deliveryZone)
{
$formHandlerResponse = $this->getFormHandlerManager()
->createAndHandle(
$this->get('app.form_handler.delivery_zone_edit'),
$request,
[
'deliveryZone' => $deliveryZone,
]
);