This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.3", | |
"info": { | |
"title": "Swagger Petstore - OpenAPI 3.0", | |
"description": "This is a sample Pet Store Server based on the OpenAPI 3.0 specification. ", | |
"version": "1.0.11" | |
}, | |
"servers": [ | |
{ | |
"url": "https://petstore3.swagger.io/api/v3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: "2.0" | |
info: | |
description: "This is a sample documentatio for de Color API." | |
version: "1.0.0" | |
title: "Swagger Color Management" | |
contact: | |
email: "example@example.com" | |
license: | |
name: "Apache 2.0" | |
url: "http://www.apache.org/licenses/LICENSE-2.0.html" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Contains \Drupal\example\Entity\Example. | |
*/ | |
namespace Drupal\example\Entity; | |
use Drupal\Core\Entity\EntityStorageInterface; | |
use Drupal\Core\Field\BaseFieldDefinition; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Form controller for the bb_report entity edit forms. | |
* | |
* @ingroup report | |
*/ | |
class FeeForm extends ContentEntityForm { | |
/** | |
* {@inheritdoc} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
tinymce.PluginManager.add('stylebuttons', function(editor, url) { | |
/** | |
* Uppercase & bold button. | |
*/ | |
editor.addButton('stylebuttons', { | |
text: 'Resalt', | |
tooltip: 'Uppercase and bold at time.', | |
icon: true, | |
image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABiklEQVQ4T52TvUoDQRDHZ/ZEtMgpvoBYaBvyAOKRSuGyJkV6QUgULARbg4g+gKDGECx8A3NLIFqo5wsoYuFHIT6B6KXJmWRH9rg7jnhJxG2WnZn/b3ZmZxF6Fuc8RaQVESktpZxWbsbgHQCvpWSVev38ISrB4JDP58ddt30IAKu90MiZiLDabE5s2vZZS9k9gC++BID5AeKIS946ztSigngAzrOnQzLHcKkihLWOqmYAdtcnc8m378URpMQUZjK5CiIVYwJKQtT2/RtuA8AvCCKUkfPsKwDM9gBCcWDnPBsDoWc0Te4yxkYjgF3H+fQy27bdUbthGCNq1/VJBdmJxLpxgNAvRC1oMvXpkaua+ALA5uIChgGIuk/I+fIJAK79BwAAR2iauSRjdB8MVRQ05AaESEmvxgFPOWiqj4WwNjyAYayM6frHBQBb+MsoE+FNp9NaajQabviZFCSR+DpApEJcOT6YAKjcbn9vKXH4maJZVU80jQpElAbAGeUj6r4haleIVLUs6zEa/wMGdqGMo9K2vQAAAABJRU5ErkJggg==', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.st status | |
git config --global alias.logf 'log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat' | |
git config --global alias.ld 'log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative' | |
git config --global alias.logv 'log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"' | |
git config --global alias.logb 'log --graph --full-history --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function mail_customization_mail_alter(&$message){ | |
$preg = '/((https?:\/\/)([\da-z\.-]+)\.?([a-z\.]{2,6})?([\/\w \.-]*)*\/?(\?([A-Za-z0-9=&])*)?)/'; | |
foreach($message['body'] as $key=>$body){ | |
preg_match($preg , $body, $matches); | |
if (!empty($matches[0])){ | |
$url = $matches[0]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export GIT_PS1_SHOWDIRTYSTATE=true | |
export GIT_PS1_SHOWUNTRACKEDFILES=true | |
export GIT_PS1_SHOWSTASHSTATE=true | |
export PS1='\[\033[1;34m\]\u\[\033[0;30m\]@\[\033[0;32m\]\w\[\033[0;30m\]$(__git_ps1 " [\[\e[31;1m\]%s\[\e[0m\]]")\$ ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Before this, you have to create a "Preproces field" with name like "mycustomfield". | |
* In this example we render an user image (a image field, not the user picture). | |
* | |
*/ | |
function MYMODULE_preprocess_comment(&$vars){ | |
$author= user_load($vars['user']->uid); | |
$settings= array('settings' => array('image_style' => 'thumbnail'),'label' => 'hidden' ); | |
$vars['mycustomfield'] = render(field_view_field('user', $author, 'field_user_main_image', $settings)); | |
} |
NewerOlder