Skip to content

Instantly share code, notes, and snippets.

View junaidpv's full-sized avatar

Junaid P V junaidpv

View GitHub Profile
@junaidpv
junaidpv / main.c
Last active October 11, 2018 11:00
Confirmed working code wrote myself to read data from MAX31855K chip with SMT32F030F3.
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
** This notice applies to any and all portions of this file
* that are not between comment pairs USER CODE BEGIN and
* USER CODE END. Other portions of this file, whether
* inserted by the user or by software development tools
@junaidpv
junaidpv / drupal-user-module-show-site-name-special-characters.patch
Created November 28, 2018 07:54
Show special characters in site's name in user login form.
diff --git a/modules/user/user.module b/modules/user/user.module
index 2309aa9296..cb505bae69 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -2116,7 +2116,7 @@ function user_login($form, &$form_state) {
'#required' => TRUE,
);
- $form['name']['#description'] = t('Enter your @s username.', array('@s' => variable_get('site_name', 'Drupal')));
+ $form['name']['#description'] = t('Enter your !s username.', array('!s' => variable_get('site_name', 'Drupal')));
@junaidpv
junaidpv / widgtes-module-call-widget-view-callback-correctly.patch
Last active December 6, 2018 08:38
Patch for drupal widget module to call view callback correctly.
diff --git a/widgets.module b/widgets.module
index 5cf4298..cc1613a 100644
--- a/widgets.module
+++ b/widgets.module
@@ -1121,6 +1121,10 @@ function theme_widgets_set_view($variables) {
$template = $element['template'];
$data = isset($element['data']) ? $element['data'] : array();
$token_data['widgets']['element'] = $element;
+
+ if (isset($element['view callback']) && $element['view callback']) {
@junaidpv
junaidpv / jquery.cycle.all.js
Created December 14, 2018 20:33
Patch fro jquery.cycle plugin to introduce resize command. resize command helps to re-size slideshow when window are resized.
--- <unnamed>
+++ <unnamed>
@@ -151,6 +151,34 @@
if (typeof arg2 == 'string')
opts.oneTimeFx = arg2;
$.fn.cycle[options](opts);
+ return false;
+ case 'resize':
+ // cont.cyclePause = 1;
+ // triggerPause(cont);
@junaidpv
junaidpv / allow-altering-footer-url-in-print-pdf-pages.patch
Last active August 9, 2022 10:11
Patch for Drupal print module to allow alter footer links in print and PDF pages. Now updated fro 7.x-2.4
@junaidpv
junaidpv / panelizer-image-field-picture-mapping.patch
Created February 25, 2019 14:49
To fix issue inability to change picture mapping on primary image field in panelizer pane.
diff --git a/mlpanels_panels_renderer_editor.class.php b/mlpanels_panels_renderer_editor.class.php
index b1493bb..b550e99 100755
--- a/mlpanels_panels_renderer_editor.class.php
+++ b/mlpanels_panels_renderer_editor.class.php
@@ -155,7 +155,11 @@ class mlpanels_panels_renderer_editor extends panels_renderer_editor {
// Building form.
$output = ctools_content_form('edit', $form_info, $form_state, $content_type, $pane->subtype, $subtype, $configuration, $step);
-
+ // This is a temporrary fix to get processed configiration.
diff --git a/panopoly_core.make b/panopoly_core.make
index 677a776..dd45ceb 100644
--- a/panopoly_core.make
+++ b/panopoly_core.make
@@ -26,6 +26,7 @@ projects[fieldable_panels_panes][version] = 1.11
projects[fieldable_panels_panes][subdir] = contrib
projects[fieldable_panels_panes][patch][2826205] = https://www.drupal.org/files/issues/fieldable_panels_panes-n2826205-39.patch
projects[fieldable_panels_panes][patch][3019270] = https://www.drupal.org/files/issues/2018-12-10/2848997-cant-access-admin-too-many-redirects.patch
+projects[fieldable_panels_panes][patch][] = https://www.drupal.org/files/issues/2019-03-11/prevent-wront-redirect-3039174-2.patch
@junaidpv
junaidpv / file-type-migrate-to-media-type.patch
Created June 18, 2019 14:10
Patch D8 core to migrate fields from file entities in D7 to D8 media entites.
diff --git a/core/modules/field/migrations/d7_field.yml b/core/modules/field/migrations/d7_field.yml
index 96bf5caac2..8cf9423527 100644
--- a/core/modules/field/migrations/d7_field.yml
+++ b/core/modules/field/migrations/d7_field.yml
@@ -11,7 +11,13 @@ source:
status: true
langcode: und
process:
- entity_type: entity_type
+ entity_type:
@junaidpv
junaidpv / allow-to-add-css-for-editor-2855470-7.patch
Last active January 28, 2022 12:59
Patch for wysiwyg_template module 8.2.1. To add setting to add CSS to use in ckeditor and node view pages.
diff --git a/config/install/wysiwyg_template.settings.yml b/config/install/wysiwyg_template.settings.yml
index 8b3a650..b2380fd 100644
--- a/config/install/wysiwyg_template.settings.yml
+++ b/config/install/wysiwyg_template.settings.yml
@@ -1 +1,3 @@
library_path: 'libraries/templates'
+editor_css: ''
+view_css: ''
diff --git a/config/schema/wysiwyg_template.schema.yml b/config/schema/wysiwyg_template.schema.yml
index 46c694a..857962c 100644
@junaidpv
junaidpv / malayalam.tplx
Last active August 15, 2019 07:27
This template worked for me to generate PDF doucment with malayalam text in Jupyter notebook. Use command: jupyter nbconvert --to latex --template malayalam.tplx "notebook.ipynb" && xelatex "notebook.tex"
((*- extends 'article.tplx' -*))
% See http://blog.juliusschulz.de/blog/ultimate-ipython-notebook#templates
% for some useful tips
%===============================================================================
% Document class
%===============================================================================
%===============================================================================