Skip to content

Instantly share code, notes, and snippets.

FROM php:7.3-apache-stretch
ARG UID
ARG GID
ENV APACHE_DOCUMENT_ROOT /var/www/html/public
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
#Recreates the user www-data with the current user's id and group id
@thureos
thureos / test.md
Last active June 19, 2023 21:54
PHP Developer

PHP Developer Coding Exemplar

Instructions

This coding exemplar is designed to highlight your skills and areas of expertise with the PHP language in general. We rely mainly on PHP as our web technology of choice. Because of this, it's important that developers have a well-rounded understanding of the PHP language.

Please complete the following questions to the best of your ability. If you are unable to solve a question, please indicate as such. You should feel free to use the PHP manual and other resources to solve these questions; after all, we expect that our developers will use their problem-solving skills at work! Some questions are intended to be difficult, while others are meant to be easy or obvious. Please post your answers in a private Gist, using Markdown format, and send the link for review.

This exercise should take approximately one hour to complete.

Good luck!

@thureos
thureos / docker.sh
Last active November 13, 2023 21:20
Quick maria - redis docker containers
docker run --restart always -p 3306:3306 --name maria -e MYSQL_ROOT_PASSWORD=example -d mariadb:10.3
docker run --restart always -p 6379:6379 --name redis -d redis
docker run --restart always -p 27017:27017 --name mongo -e MONGO_INITDB_ROOT_USERNAME=root -e MONGO_INITDB_ROOT_PASSWORD=example -d mongo:4.0.27
docker run -p 3306:3306 --name mysql-8.0.35 -e MYSQL_ROOT_PASSWORD=example -d mysql mysqld --default-authentication-plugin=mysql_native_password
@thureos
thureos / History|-1036fe62|entries.json
Last active July 5, 2022 12:43
vscode-settings-sync
{"version":1,"resource":"file:///home/wicho/src/sportsrecruits-api/Dockerfile.pipeline","entries":[{"id":"YR7F.pipeline","source":"textFileCreate.source","timestamp":1654198640359}]}
@thureos
thureos / fsafsa.php
Created October 22, 2019 15:46
asfvsa
<?php
echo `./wtfutil --config=/var/www/html/wtf/config.yml`;
@thureos
thureos / config.yml
Created October 22, 2019 15:11
wtf.yml
wtf:
colors:
border:
focusable: darkslateblue
focused: orange
normal: gray
grid:
columns: [32, 32, 32, 32, 32, 32, 32]
rows: [10, 10, 10, 10, 10, 10, 10]
refreshInterval: 1
@thureos
thureos / selenium_chrome.py
Created December 19, 2018 15:23
Selenium Remote Webdriver set Chrome User Agent
capabilities = webdriver.common.desired_capabilities.DesiredCapabilities.CHROME.copy()
capabilities['javascriptEnabled'] = True
options = webdriver.ChromeOptions()
options.add_argument('--user-agent=<YOUR USER AGENT HERE>')
driver = webdriver.Remote(command_executor='http://<YOUR SELENIUM HUB HERE>:4444/wd/hub',desired_capabilities=capabilities, options=options)
@thureos
thureos / wizard.php
Created September 14, 2018 17:40
Couple functions to create a CLI wizard
<?php
function say($text, $color = null, $default = null)
{
$colors = [
'black' => "30m",'red' => "31m",'green' => "32m",'yellow' => "33m",'blue' => "34m",'magenta' => "35m",
'cyan' => "36m",'lightGray' => "37m",'darkGray' => "90m",'lightRed' => "91m",'lightGreen' => "92m",'lightYellow' => "93m",
'lightBlue' => "94m",'lightMagenta' => "95m",'lightCyan' => "96m",'white' => "97m",'noColor' => "0m",
];
$open = @$colors[$color] ?: '0m';