Skip to content

Instantly share code, notes, and snippets.

@andypost
andypost / drupal_contexts.html
Last active December 27, 2015 18:39
drupal all used contexts
<select name="context" class="form-select is-default" id="edit-context">
<option value="all" selected="selected">Все</option>
<option value="none">No context</option>
<option value="a ColiPoste SoColissimo flexibility rate relative to a shipping service">
a ColiPoste SoColissimo flexibility rate relative to a shipping service
</option>
<option value="a domain">a domain</option>
<option value="a drupal commerce card on file">a drupal commerce card on
file
</option>
@andypost
andypost / gist:7570785
Created November 20, 2013 20:51
page manager & panels
<andypost> sdboyer, please, point me to last your post about page manager or panels, should I looks for princes code?
<sdboyer> andypost: in a d8 context?
<andypost> sdboyer, yep
<sdboyer> andypost: princess is the place to look, but i haven't touched it directly since dedicating myself to assets work several months ago
<sdboyer> andypost: last thing is the generalized vision i posted on g.d.o...sec
<sdboyer> andypost: https://groups.drupal.org/node/287563
<Druplicon> https://groups.drupal.org/node/287563 => Blocks & Layouts (SCOTCH) Post-Feature Freeze Overview => 9 comments, 1 IRC mention
<andypost> sdboyer, there's https://drupal.org/node/1875974 about displays, probably this could be simply wrapped here
<Druplicon> https://drupal.org/node/1875974 => Abstract 'component type' specific code out of EntityDisplay [#1875974] => 21 comments, 19 IRC mentions
<sdboyer> andypost: getting things into core is obviously not feasible now, but we can still mostly do things in contrib
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index 3c1ee17..ee258b1 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -139,9 +139,9 @@ function comment_theme() {
'render element' => 'elements',
'template' => 'comment',
),
- 'comment_wrapper' => array(
- 'render element' => 'content',
The following flags are defined for the st_mode field:
S_IFMT 0170000 bit mask for the file type bit fields
S_IFSOCK 0140000 socket
S_IFLNK 0120000 symbolic link
S_IFREG 0100000 regular file
S_IFBLK 0060000 block device
S_IFDIR 0040000 directory
S_IFCHR 0020000 character device
S_IFIFO 0010000 FIFO
@andypost
andypost / bootstrap_python.yml
Last active August 29, 2015 14:21
Ansible playbook to bootstrap python for coreOS
- name: bootstrap coreos with real python
hosts: coreos
gather_facts: False
vars:
core_home: /home/core
pypy_file: pypy-2.4.0-linux64.tar.bz2
pypy_dir: pypy-2.4.0-linux64
pypy_shim: |
#!/bin/bash
@andypost
andypost / .gitconfig
Last active December 21, 2021 10:42
My git config
[color]
ui = auto
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[core]
whitespace=fix,-indent-with-non-tab,-indent-with-tab,trailing-space,cr-at-eol
@andypost
andypost / bootstrap_toolbox.yml
Last active June 12, 2022 14:49
Ansible playbook to bootstrap python for coreOS
- name: bootstrap python with toolbox
hosts: coreos
gather_facts: False
vars:
ansible_bin: /home/coreos/bin
ansible_python_interpreter: "{{ansible_bin}}/python"
python_shim: |
#!/bin/bash
toolbox -q --bind=/home:/home python "$@"
diff --git a/dblib.install b/dblib.install
index 1e1b063..588d3a7 100644
--- a/dblib.install
+++ b/dblib.install
@@ -36,65 +36,76 @@ function dblib_requirements($phase) {
if ($phase == 'runtime') {
/* @var Connection $connection Database Connection */
- $connection = Database::getConnection();
- $options = $connection->getConnectionOptions();
diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php
index 48b3bcd..825a0ff 100644
--- a/core/lib/Drupal/Core/Render/Renderer.php
+++ b/core/lib/Drupal/Core/Render/Renderer.php
@@ -7,6 +7,7 @@
namespace Drupal\Core\Render;
+use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\Html;