Skip to content

Instantly share code, notes, and snippets.


Michel Tomas superbiche

View GitHub Profile
superbiche /
Last active Jun 21, 2020 — forked from hn-support/
A threaded cache warmer in python
#!/usr/bin/env python
Warm the caches of your website by crawling each page defined in sitemap.xml (can use a local file or an URL).
To use, download this file and make it executable. Then run:
./ --threads 4 --url -v
import argparse
import multiprocessing.pool as mpool
import os.path
import re

Keybase proof

I hereby claim:

  • I am superbiche on github.
  • I am superbiche ( on keybase.
  • I have a public key whose fingerprint is E8B7 EB88 FC66 D8EC 742E 3EF9 E37D EC39 DC4D 305C

To claim this, I am signing this object:

superbiche /
Created Aug 15, 2019 — forked from rg3915/
Generate graphic model Django with PyGraphViz

How to generate graphic model Django with PyGraphViz?

sudo apt-get install graphviz libgraphviz-dev pkg-config
virtualenv -p python2.7 .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install pygraphviz
pip uninstall pyparsing
pip install -Iv
View oauth_disable_token_cleaning.patch
diff --git a/simple_oauth.module b/simple_oauth.module
index deba4e1..b4e7904 100644
--- a/simple_oauth.module
+++ b/simple_oauth.module
@@ -19,19 +19,20 @@ use Drupal\user\RoleInterface;
* Implements hook_cron().
function simple_oauth_cron() {
superbiche /
Created May 28, 2019 — forked from fpytloun/
Real time GlusterFS top-like monitoring
#!/usr/bin/env python
Display gluster traffic
This tool uses gluster profiling feature, parsing cumulative statistics.
To understand correctly the results, you have to divide overall write statistics with number of replicas.
Also striped volumes needs to be taken in mind - overall statistics just print sum of all bricks
read/written bytes.
superbiche /
Created Apr 2, 2019 — forked from WengerK/
Programatically use Solr on Drupal 8

🔍 Solr (6.1.0+) search Engine & Tika (1.13+) Extractor

We are using solr for search index.

Solr need to be configured for drupal. Follow the INSTALL.txt found in the search_api_solr module.

As a pre-requisite for running your own Solr server, you'll need Java 6 or higher.


View taxonomy-menu-alter-tree-3.patch
diff --git a/config/schema/taxonomy_menu.schema.yml b/config/schema/taxonomy_menu.schema.yml
index 91f73c0..a247492 100644
--- a/config/schema/taxonomy_menu.schema.yml
+++ b/config/schema/taxonomy_menu.schema.yml
@@ -20,6 +20,9 @@ taxonomy_menu.taxonomy_menu.*:
type: integer
label: 'Depth'
+ limit:
+ type: integer
View taxonomy-menu-alter-tree-1.patch
diff --git a/src/Entity/TaxonomyMenu.php b/src/Entity/TaxonomyMenu.php
index 27f2c23..800f585 100644
--- a/src/Entity/TaxonomyMenu.php
+++ b/src/Entity/TaxonomyMenu.php
@@ -201,6 +201,7 @@ class TaxonomyMenu extends ConfigEntityBase implements TaxonomyMenuInterface {
$links[$mlid] = $this->buildMenuDefinition($term, $base_plugin_definition);
+ \Drupal::moduleHandler()->alter('taxonomy_menu_tree', $links, $terms);
View schemata_fix_commerce_payment_method_issues.patch
diff --git a/schemata_json_schema/src/Normalizer/jsonapi/SchemataSchemaNormalizer.php b/schemata_json_schema/src/Normalizer/jsonapi/SchemataSchemaNormalizer.php
index d1a8553..a953bdf 100644
--- a/schemata_json_schema/src/Normalizer/jsonapi/SchemataSchemaNormalizer.php
+++ b/schemata_json_schema/src/Normalizer/jsonapi/SchemataSchemaNormalizer.php
@@ -46,7 +46,7 @@ class SchemataSchemaNormalizer extends JsonApiNormalizerBase {
'type' => 'string',
'title' => 'type',
'description' => t('Resource type'),
- 'enum' => [$resource_type->getTypeName()]
+ 'enum' => [$resource_type ? $resource_type->getTypeName() : $entity->getEntityTypeId()]
View jsonapi_extras-vesta-url-enhancer.patch
diff --git a/src/Plugin/jsonapi/FieldEnhancer/UrlLinkEnhancer.php b/src/Plugin/jsonapi/FieldEnhancer/UrlLinkEnhancer.php
new file mode 100644
index 0000000..b5b7d3d
--- /dev/null
+++ b/src/Plugin/jsonapi/FieldEnhancer/UrlLinkEnhancer.php
@@ -0,0 +1,101 @@
+namespace Drupal\jsonapi_extras\Plugin\jsonapi\FieldEnhancer;
You can’t perform that action at this time.