In my-plugin/my-plugin.php
:
public function onPluginsInitialized(): void {
...
$this->router();
}
public function router() {
/** @var Uri $uri */
In my-plugin/my-plugin.php
:
public function onPluginsInitialized(): void {
...
$this->router();
}
public function router() {
/** @var Uri $uri */
<?php | |
namespace Deployer; | |
require_once 'recipe/common.php'; | |
add('recipes', ['grav']); | |
add('shared_dirs', [ | |
'user/accounts', |
<div | |
x-data="{ | |
model: @entangle($attributes->wire('model')), | |
}" | |
x-init=" | |
select2 = $($refs.select) | |
.not('.select2-hidden-accessible') | |
.select2({ | |
theme: 'bootstrap', | |
dropdownAutoWidth: true, |
Image.js
from the source below (it is almost a copy of Image.js from tiptap-extensions
except that it has a constructor that accepts uploadFunc
(function to be called with image
being uploaded) and additional logic if(upload) { ... } else { ... previous base64 logic .. }
in the new Plugin
section.import {Node, Plugin} from 'tiptap'
import {nodeInputRule} from 'tiptap-commands'
/**
* Matches following attributes in Markdown-typed image: [, alt, src, title]
*
<?php | |
namespace Deployer; | |
require 'recipe/laravel.php'; | |
require 'vendor/deployer/recipes/local.php'; | |
require 'vendor/deployer/recipes/rsync.php'; | |
require 'vendor/deployer/recipes/npm.php'; | |
// Configuration | |
set('ssh_type', 'native'); |
FROM php:7.0.4-fpm | |
RUN apt-get update && apt-get install -y libmcrypt-dev \ | |
mysql-client libmagickwand-dev --no-install-recommends \ | |
&& pecl install imagick \ | |
&& docker-php-ext-enable imagick \ | |
&& docker-php-ext-install mcrypt pdo_mysql |
/* | |
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects. | |
It will generate several classes such as: | |
.m-r-10 which gives margin-right 10 pixels. | |
.m-r-15 gives MARGIN to the RIGHT 15 pixels. | |
.m-t-15 gives MARGIN to the TOP 15 pixels and so on. | |
.p-b-5 gives PADDING to the BOTTOM of 5 pixels | |
.p-l-40 gives PADDING to the LEFT of 40 pixels |
To install a composer package globally, you run the usual require command, but with the addition of the global modifier. So to install PHPUnit, you would run:
$ composer global require phpunit/phpunit
$ composer global require phpunit/dbunit
$ composer global require phing/phing
$ composer global require phpdocumentor/phpdocumentor
$ composer global require sebastian/phpcpd
import requests | |
import base64 | |
from tqdm import tqdm | |
master_json_url = 'https://178skyfiregce-a.akamaihd.net/exp=1474107106~acl=%2F142089577%2F%2A~hmac=0d9becc441fc5385462d53bf59cf019c0184690862f49b414e9a2f1c5bafbe0d/142089577/video/426274424,426274425,426274423,426274422/master.json?base64_init=1' | |
base_url = master_json_url[:master_json_url.rfind('/', 0, -26) + 1] | |
resp = requests.get(master_json_url) | |
content = resp.json() |