Skip to content

Instantly share code, notes, and snippets.

@otarza
otarza / frame.html
Created July 18, 2015 10:44
FloatInIframe
<!DOCTYPE html>
<html>
<head>
<title>Frame</title>
<style type="text/css">
.body {
height: 10000px;
display: block;
width: 100%;
}
@otarza
otarza / ka.php
Created August 11, 2015 19:19
ka.php
<?php
return array(
/*
|--------------------------------------------------------------------------
| Date Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the date library. Each line can
@otarza
otarza / ka.i18n.json
Created October 15, 2015 11:33
Telescope translation for Geogian language
{
"menu" : "მენიუ",
"view" : "View",
"top" : "Top",
"new" : "New",
"best" : "საუკეთესო",
"digest" : "Digest",
"scheduled" : "Scheduled",
"users" : "მოხმარებლები",
"settings" : "სეთინგები",
@otarza
otarza / styleo.css
Created November 24, 2015 10:17
Centre Style
@font-face {
font-family: mtavruli;
src: url(../fonts/bpg-le-studio-caps.ttf);
}
@font-face {
font-family: mxedruli;
src: url(../fonts/bpg-le-studio-04.ttf);
}
root@9c76c50b4019:/var/www/project/web# phpcs modules/custom/sync_data/drush/sync_data.drush.inc
FILE: ...w/project/web/modules/custom/sync_data/drush/sync_data.drush.inc
----------------------------------------------------------------------
FOUND 100 ERRORS AND 1 WARNING AFFECTING 73 LINES
----------------------------------------------------------------------
3 | ERROR | [ ] Missing short description in doc comment
7 | ERROR | [ ] Content of the @author tag must be in the form
| | "Display Name <[email protected]>"
8 | WARNING | [ ] PHP version not specified
phpcs --standard=Drupal,DrupalPractice,DrupalStrict --extensions=php,module,install,profile,drush.inc,yml,test,admin.inc,js,css --report-width=4 --colors ./web/modules/custom/
FILE: ...w/project/web/modules/custom/sync_data/drush/sync_data.drush.inc
----------------------------------------------------------------------
FOUND 33 ERRORS AND 8 WARNINGS AFFECTING 19 LINES
----------------------------------------------------------------------
7 | WARNING | [ ] @author tags are not usually used in Drupal,
| | because over time multiple contributors will
| | touch the code anyway
58 | WARNING | [ ] Line exceeds 80 characters; contains 84
phpcs --standard=Drupal,DrupalPractice,DrupalStrict --extensions=php,module,install,profile,drush.inc,yml,test,admin.inc,js,css --report-width=4 --colors ./web/modules/custom/ ./web/themes/contrib/
FILE: ...web/themes/contrib/wfp_base/css/components/wfp-base.messages.css
----------------------------------------------------------------------
FOUND 40 ERRORS AFFECTING 40 LINES
----------------------------------------------------------------------
6 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
7 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 4
@otarza
otarza / conflict
Created January 28, 2016 21:25
conflict
<<<<<<< c45d88ada97a23a4aadd4aec9ad201c2a29370f1
{#
/**
=======
{#/**
>>>>>>> commit with theme (merged with feature/theme)
* @file
* Theme override to display a menu.
*
* Available variables:
@otarza
otarza / contact-regression-reroll-fix-contact-navigation-block-interdiff
Created January 29, 2016 07:11
Reroll for Regression: category selector missing on site wide contact form: https://www.drupal.org/node/1997692#comment-10146010
diff --git a/core/modules/contact/src/Plugin/Block/ContactNavigationBlock.php b/core/modules/contact/src/Plugin/Block/ContactNavigationBlock.php
index 6b79758..d4ad47d 100644
--- a/core/modules/contact/src/Plugin/Block/ContactNavigationBlock.php
+++ b/core/modules/contact/src/Plugin/Block/ContactNavigationBlock.php
@@ -7,14 +7,14 @@
namespace Drupal\contact\Plugin\Block;
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\Html;
@otarza
otarza / Drupal-8-register-form.php
Created March 2, 2016 10:42
Render drupal 8 register form
<?php
$entity = \Drupal::entityTypeManager()->getStorage('user')->create(array());
$formObject = \Drupal::entityTypeManager()
->getFormObject('user', 'register')
->setEntity($entity);
$form = \Drupal::formBuilder()->getForm($formObject);
print \Drupal::service('renderer')->render($form);