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
var inpName = $('input#ins');
console.log(inpName);
console.log(inpName.val());
$('#ins').on('click',function () {
// $('.insert').hide();
alert('ffff');
})
<?php
/**
* Created by PhpStorm.
* User: Lex
* Date: 24.01.2018
* Time: 2:22
*/
namespace App;
<?php
namespace Drupal\map_point_editor\Controller;
use Drupal\Component\Serialization\Json;
use Drupal\Core\Controller\ControllerBase;
use Drupal\housing\Entity\HousingInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Entity\EntityTypeManager;
use Drupal\braslavlakes_map\GeodataMapService;
#!/bin/bash
if [[ "$PARAM_drupal_support" = "on" ]]
then
cat | sed 's|</doc>$|<params><DRUPAL_SUPPORT>none</DRUPAL_SUPPORT></params></doc>|'
else
cat | sed 's|</doc>$|<params><DRUPAL_SUPPORT>on</DRUPAL_SUPPORT></params></doc>|'
fi
@cyberlex404
cyberlex404 / HousingSubpagesGenerator.php
Created March 10, 2018 20:14
Adding custom links to the sitemap.xml. Drupal 8 simple_sitemap plugin
<?php
namespace Drupal\housing\Plugin\simple_sitemap\UrlGenerator;
use Drupal\Core\Url;
use Drupal\housing\Entity\Housing;
use Drupal\simple_sitemap\Annotation\UrlGenerator;
use Drupal\simple_sitemap\EntityHelper;
use Drupal\simple_sitemap\Logger;
use Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\UrlGeneratorBase;
Drupal Console Launcher version 1.6.1
Drupal Console version 1.7.0
Usage:
command [options] [arguments]
Options:
Available commands:
about Displays basic information about Drupal Console project
socialid.network_config.vkcom:
type: mapping
label: 'vk.com config'
mapping:
app_id:
type: string
label: 'App ID'
app_secret:
type: string
label: 'App secret'
<?php
namespace Drupal\geofield_yamaps_simple;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Url;
use Drupal\Component\Serialization\Json;
use Drupal\Core\Form\FormStateInterface;
(function ($, Drupal, settings) {
"use strict";
Drupal.behaviors.BraslavLakesMap = {
attach: function (context) {
if (drupalSettings['braslavlakes_map']) {
<?php
namespace Drupal\housing\Plugin\JsonLdEntity;
use Drupal\Component\Serialization\Json;
use Drupal\Core\Entity\EntityInterface;
use Drupal\image\Entity\ImageStyle;
use Drupal\json_ld_schema\Entity\JsonLdEntityBase;
use Spatie\SchemaOrg\Type;
use Spatie\SchemaOrg\Schema;