Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Coding

Jibran Ijaz jibran

👨‍💻
Coding
View GitHub Profile
@jibran
jibran / field.field.node.article.field_der.yml
Created May 24, 2016
Difference between DER and ER fields.
View field.field.node.article.field_der.yml
uuid: 6ad5c377-24dc-4c3c-9ccf-027a87ced18f
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_der
- node.type.article
module:
- dynamic_entity_reference
id: node.article.field_der
View gist:3c0bebededfceb92de84
Verifying that +jibran is my blockchain ID. https://onename.com/jibran
@jibran
jibran / my_module.install
Created Apr 21, 2015
Create a custom block.
View my_module.install
<?php
function my_module_update_xxxx () {
$query = db_insert('block_custom')
->fields(array(
'body' => 'Some markup',
'info' => 'Some title for info',
'format' => 'rich_text',
));
$bid = query->execute();
@jibran
jibran / drush
Last active Aug 29, 2015
my drush file
View drush
#!/bin/bash
version=$(git config --get drush.version)
if [ "$version" = '7' ];
then
drush7 "$@"
else
drush6 "$@"
fi
@jibran
jibran / terms_from_term.inc
Last active Aug 29, 2015
Plugin to provide an relationship handler for all terms from term. plugins/relationships/terms_from_term.inc
View terms_from_term.inc
<?php
/**
* @file
* Plugin to provide an relationship handler for all terms from term.
*/
/**
* Plugins are described by creating a $plugin array which will be used
* by the system that includes this file.
@jibran
jibran / composer.json
Created Feb 9, 2015
Composer file for Dynamic Entity Reference
View composer.json
{
"name": "drupal/dynamic_entity_reference",
"description": "Provides a field that allows an entity-reference field to reference more than one entity type.",
"type": "drupal-module",
"homepage": "http://drupal.org/project/dynamic_entity_reference",
"authors": [
{
"name": "Lee Rowlands",
"homepage": "https://www.drupal.org/u/larowlan",
"role": "Maintainer"
View keybase.md

Keybase proof

I hereby claim:

  • I am jibran on github.
  • I am jibran (https://keybase.io/jibran) on keybase.
  • I have a public key whose fingerprint is 1BAA 8DB2 FC73 AA12 D097 9B74 ABC6 FFBD 02E0 32B1

To claim this, I am signing this object:

@jibran
jibran / .eslintrc
Last active Jul 19, 2017
Sample eslint file for Drupal 7
View .eslintrc
{
"env": {
"browser": true
},
"globals": {
"Drupal": true,
"jQuery": true,
"tinyMCE": true
},
"rules": {
@jibran
jibran / id_rsa.pub
Created Nov 12, 2013
Public ssh keys
View id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA7/ux7RQnD9gxf9cbwNBR1fUtCJ0fWNEm7b3WVDuxrvfQCPf7Aj8qq80hzXoS7zmXH36ScFi6/nugZQ/MuREbfNRZDuN5AXPNp7hIFjLFhvBvYWJOaP1f+jBIJrC1AgUPvSy+EE5mml+RETc/8p2MeiCPUjV6nXW4FfyJd4HFpal14FZN7Vfd4B6TJuUVce6WEdlZmLYT+Qtx/FFIOnl4wnf/hpR4r8/U9yjG+f4FoD/UarX4s0dG4f7oJvA1KJAFR8mRr7MrnPD4y91bTD4fYQlI+4NcItC5fMa1sent8Pcg9K55d2B2S9GE2/p09hh3pYQewI+T0pShHsvcK7JV/Q== jibran@Wolverine
View gist:4437285
<?php
$link = new Link();
$link->text = 'foo';
$link->path = 'bar';
$link->attributes = new Attribute();
$link->language = LANGUAGE_NONE;
$link->html = TRUE;
$link->query = array('foo' => 'bar');
$link->fragment => 'foo-bar';
$link->absolute' => FALSE;