Skip to content

Instantly share code, notes, and snippets.

@Julien1138
Julien1138 / Editor.vue
Last active Oct 3, 2021
Tiptap collaboration server handles multiple document using namespaces and rooms
View Editor.vue
<template>
<div class="editor">
<template v-if="editor && !loading">
<div class="count">
{{ count }} {{ count === 1 ? 'user' : 'users' }} connected to {{ projectPath }}/{{ docName }}
</div>
<editor-content class="editor__content" :editor="editor" />
</template>
<em v-else>
Connecting to socket server …
@Julien1138
Julien1138 / Editor.vue
Last active Sep 3, 2020
Tiptap collaboration server handles multiple document using namespaces
View Editor.vue
<template>
<div class="editor">
<template v-if="editor && !loading">
<div class="count">
{{ count }} {{ count === 1 ? 'user' : 'users' }} connected to {{ projectPath }}
</div>
<editor-content class="editor__content" :editor="editor" />
</template>
<em v-else>
Connecting to socket server …
View trustedproxy.php
<?php
return [
/*
* Set trusted proxy IP addresses.
*
* Both IPv4 and IPv6 addresses are
* supported, along with CIDR notation.
*
View launch.json
{
"name": "Listen for XDebug on Docker App",
"type": "php",
"request": "launch",
"port": 9000,
"pathMappings": {
"/var/www/html": "${workspaceFolder}"
},
"hostname": "localhost",
"xdebugSettings": {
View HasRevisionsWithDiffs.php
<?php
namespace App\Models\Traits;
// use Illuminate\Database\Eloquent\Collection;
use SN\DaisyDiff\DaisyDiff;
use Neurony\Revisions\Traits\HasRevisions;
trait HasRevisionsWithDiffs
{
View docker-compose.yml
version: '3.5'
services:
# Our application to debug
app:
container_name: tuto-xdebug
build:
context: ./
dockerfile: ./dockerfile
View dockerfile
FROM php:7.4-apache
# Install Xdebug
RUN pecl install -f xdebug
RUN echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini;
View index.php
<?php
$name = $_REQUEST['name'];
$hello = "Bonjour " . $name . " !";
echo $hello;