Skip to content

Instantly share code, notes, and snippets.

View cyberlex404's full-sized avatar
🏠
Working from home

Lex Misiuro cyberlex404

🏠
Working from home
View GitHub Profile
<?php
/**
* Created by PhpStorm.
* User: Lex
* Date: 20.10.2015
* Time: 9:05
*/
/**
* This plugin array is more or less self documenting
/**
* Created by Lex on 01.03.2016.
*/
/**
* Provide the HTML to create the modal dialog.
*/
(function ($) {
Drupal.theme.prototype.login_modal = function () {
var html = '';
<?php
/**
* Created by PhpStorm.
* User: Lex
* Date: 20.10.2015
* Time: 2:05
*/
function bras_profile_menu() {
$items = array();
s = list(map(int, input().split()))
#input()
print(s)
if s[0] < s[1]:
print(2 * s[0] - 1)
elif s[0] > s[1]:
print(2 * s[1] - 1)
elif s[0] == s[1]:
print(2 * s[1] - 1)
allstep = {1: {'x':-1, 'y': 2},
2: {'x':1, 'y': 2},
3: {'x':2, 'y': 1},
4: {'x':2, 'y': -1},
5: {'x':1, 'y': -2},
6: {'x':-1, 'y': -2},
7: {'x':-2, 'y': -1},
8: {'x':-2, 'y': 1},
}
liters = {1:'A', 2:'B', 3:'C', 4:'D', 5:'E', 6:'F', 7:'G', 8:'H'}
private function getViewRender($views_id, $display_id, $arguments = [], $class = NULL, $is_title = TRUE) {
if(is_null($class)) {
$class = $views_id . '-' .$display_id;
}
$build = [
'#prefix' => '<div class="' . $class . '">',
'#suffix' => '</div>',
];
// get the view machine id
$view = Views::getView($views_id);
<?php
namespace Drupal\booking_journal\Form;
use Drupal\Core\Entity\EntityForm;
use Drupal\Core\Form\FormStateInterface;
/**
* Class JournalEventTypeForm.
<?php
/**
* @file
* Contains metatag_custom_route.module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\metatag_custom_route\Entity\MetatagRouteInterface;
<?php
namespace Drupal\housing_port;
use Drupal\Core\Url;
use Drupal\node\Entity\Node;
use Drupal\Core\Database\Database;
use Drupal\node\NodeInterface;
use Drupal\taxonomy\Entity\Term;
<?php
namespace Drupal\housing_port\Form;
use Drupal\Core\Entity\Query\QueryFactory;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Queue\Batch;
use Drupal\file\Entity\File;