Skip to content

Instantly share code, notes, and snippets.

View aneek's full-sized avatar

Aneek Mukhopadhyay aneek

View GitHub Profile
sso_connect.connection.* :
type: config_entity
label: SSO connection
mapping:
name:
type: label
label: 'Name'
id:
type: string
label: 'Machine name'
@aneek
aneek / schema.yml
Created March 9, 2015 19:03
Dynamic key value schema.yml
# Defines the schema to store each connection entry.
sso_connect.connection.* :
type: config_entity
label: SSO connection
mapping:
name:
type: label
label: 'Name'
id:
@aneek
aneek / EditorImageDialogIntegrationTest
Created September 12, 2015 15:41
EditorImageDialogIntegrationTest
<?php
/**
* @file
* Contains \Drupal\editor\Tests\EditorImageDialogIntegrationTest.
*/
namespace Drupal\editor\Tests;
use Drupal\simpletest\WebTestBase;
use Drupal\editor\Entity\Editor;
@aneek
aneek / gist:b4ecd71f357ca47039b0
Created September 18, 2015 08:28
Routing alter D8
class RouteSubscriber extends RouteSubscriberBase {
/**
* {@inheritdoc}
*/
protected function alterRoutes(RouteCollection $collection) {
$front_page = \Drupal::config('system.site')->get('page.front');
// Not getting the front value with the below process (followed: https://www.drupal.org/node/2187643)
$route = $collection->get('page.front');
@aneek
aneek / lesson.json
Created November 5, 2015 10:05
Unit Level & Lesson Level Resource Representation
{
"lesson-id": "123456",
"_embedded": {
"contents": [
{
"content_id": "78901",
"path": "https://api.cambridgelms.org/v1/download"
},
{
"content_id": "98953",
This file has been truncated, but you can view the full file.
views_handler_clms_product_activation_total_subscriptions_field Object
(
[field_alias] => unknown
[aliases] => Array
(
)
[original_value] =>
[additional_fields] => Array
(
phpize && ./configure && make && make test && make install && popd && popd && rm -rf ${OPENSHIFT_TMP_DIR}/Twig
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
mysql> desc activation_code;
+----------------------------------+------------------+------+-----+-------------------+-----------------------------+
| Field | Type | Null | Key | Default | Extra |
+----------------------------------+------------------+------+-----+-------------------+-----------------------------+
| product_group_id | int(11) | YES | MUL | NULL | |
| nid | int(10) unsigned | NO | PRI | NULL | auto_increment |
| activation_code | varchar(255) | YES | MUL | NULL | |
| uid | int(11) | YES | MUL | NULL | |
| status | int(11) | YES | | NULL | |
| created | int(11
$view = new view();
$view->name = 'manage_products';
$view->description = 'List of all products';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Manage Products';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@aneek
aneek / Directory structure
Created June 11, 2017 13:12
Docker Configurations
D:.
│ docker-compose.yml
│ Dockerfile
│ start.sh
├───conf
│ php-fpm.conf
│ services-api.conf
│ vhost.conf