Create a /bin/sh wrapper to your docker container and then point PHP Intellisense at the wrapper:
#!/bin/sh
docker run \
--rm \
-i \
--network=host \
-v "$HOME":"$HOME":ro \
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
<?php | |
class Category extends Eloquent | |
{ | |
/** | |
* ----------------------------------- | |
* Make Permalink from a Title. | |
* ----------------------------------- | |
* |
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
function resize(increase_or_decrease) { | |
const direction = increase_or_decrease; | |
// First arg is the direction, elements to change follow | |
for (let i = 1; i < arguments.length; i++) { | |
let fontsize = parseInt($(arguments[i]).css('font-size')); | |
if (direction === 'increase') { | |
fontsize++; | |
if (fontsize > 20) fontsize = 20; // Prevent text from getting too big | |
} else if (direction === 'decrease') { | |
fontsize--; |
Create a /bin/sh wrapper to your docker container and then point PHP Intellisense at the wrapper:
#!/bin/sh
docker run \
--rm \
-i \
--network=host \
-v "$HOME":"$HOME":ro \
:80 { | |
root /serve | |
} |
# /------------------------------------------\ | |
# | don't forget to download the .tp file | | |
# | and place it in the user's directory :› | | |
# | | | |
# | also install lolcat: | | |
# | https://github.com/busyloop/lolcat | | |
# \------------------------------------------/ | |
alias test-passed='if [ "$?" -eq "0" ]; then lolcat ~/.tp -a -s 40 -d 2; fi;' |
<?php | |
# tests/bootstrap.php | |
declare(strict_types=1); | |
namespace App\Test; | |
use ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Client; | |
use App\Entity\User; | |
use App\Kernel; |
(cors) { | |
@cors_preflight method OPTIONS | |
header { | |
Access-Control-Allow-Origin "{header.origin}" | |
Vary Origin | |
Access-Control-Expose-Headers "Authorization" | |
Access-Control-Allow-Credentials "true" | |
} |
Sometimes NordVPN doesn't work out of the box to connect to its services on Linux, especially on distros that use KDE. Or when some terminals like Terminator are the default. For some reason.
I debugged the issue and created a custom handler to get the job done. As well as a log writer.
You must have curl installed.
To run this script, go:
bash <(curl -s https://gist.githubusercontent.com/andersonpem/f58349b7f9bb4eca446f84298e92d8de/raw/41fb5f78b47dd4535a214e486e3be4c0b9cffe1d/runme.sh)