Insightful stories that revolve around technology, culture, and design

All blogs

Topics
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Bookmark folders
Category Items

Bookmark folders

Discover a time-saving solution to bookmark and access folders with ease. Simplify your navigation in the command line.
5 min read

Tired of navigating to folders via their meandering paths.....Start using aliases, but finding them hard to manage. Enter bookmark.

This is a very handy functionality that lets us bookmark folders, and easily navigate to them in the future, rather than manually creating aliases for navigating into each folder.

Sample Use Case


cd /webapps/app1 bookmark firstapp

then next time you could directly do


go app1

rather than having to cd into the folder manually.

List of Commands

Bookmark a folder. If no arguments are passed, it will create a bookmark with that current folder's name.


cd /webapps/app2 bookmark [name]

The file where bookmarks are saved (.bookmarks) will look like this /webapps/app1|firstapp /webapps/app2|app2 Unbookmark functionality has been added as well. Will unbookmark current folder if no name is specified.


unbookmark [name]

Error message on unbookmarking a folder that doesn't exist. If you were inside a specific folder which has been bookmarked, it would be removed from list of bookmarks. Show Bookmarks to see list of bookmarks


bookmarksshow

Go - Command to navigate to a folder. Supports completion as well.


go app2

P.S. - Been using this functionality for a long time, can't remember its original author. Code's been heavily modified with a lot of functionalities added by me now. Credit to him/her as well :-)

Installation without brew

Clone (or manually download) the project:


git clone https://github.com/pratik60/bookmark.git ~/bookmark`

2. Add the following line to your `~/.bash_profile` or `~/.zshrc` file:


&&. ~/bookmark/bookmarker.sh

Installation with brew


brew tap pratik60/bookmark brew install bookmark

 

Drupal 8 Module Porting Sprint
Category Items

Drupal 8 Module Porting Sprint

Discover the productive D8 module porting sprint in Pune's Drupal community. Learn how developers tackled API changes, with a focus on porting the 'Time Spent' module from D7 to D8.
5 min read

We in Pune community have had few D8 sprints in past, where in we focussed on sub components like Router system, Multilingual and other low hanging fruits. Many Drupalers wanted to have a high level view of D8 Developer ecosystem and we decided to conduct a Module porting sprint, where the idea was to port a simple module from D7 to D8 in hope to cover maximum surface area of API Changes. Given upcoming Diwali break we decided to meetup on 12th Oct '14 at QED42's office, 13 people joined the sprint on a very short notice. 

Porting Sprint

 

Sprint kicked off with a crash course by Piyuesh on D8 API changes, this was mostly a quick rundown of D8 API Changes talkfrom Drupal camp Mumbai with some updates based on the latest API. To make sprint productive we did a code walk of a recently ported module Social stats mapping admin and UI screens to code. After a quick planning session we decided to port Time spentmodule to D8, the main idea was to select something simple and for everyone to write some code. We followed the below procedure to manage collaboration of the port: 

Port of time spent is almost complete with some clean up left, the upside was that everyone got to write some D8 code. Other than port of Time spent, Ajit finished last set of issues on Social stats and created a beta release. All in all a productive sprint on a short notice, Hi5 to all who participated. 

Update on Future Sprints - To avoid inconvenience, we also decided that future sprints could be split across 2-3 locations within Pune and for us to communicate via hangouts and IRC. We plan to have the next sprint sometime Early-Mid November, more details to follow. 

Attaching External Css and Js in Drupal 8
Category Items

Attaching External Css and Js in Drupal 8

Embrace Drupal 8's library system for adding external or inline CSS and JS. Stay updated on the latest attachment techniques.
5 min read

If you are writing your own module in Drupal, you often need to include external or inline CSS / JS through your module code. In Drupal 7 it was typically done using the below approaches:

CSS

1. Using drupal_add_css():


drupal_add_css(drupal_get_path('module', 'module_name') . '/module_name.css', array('group' => CSS_DEFAULT, 'type' => 'file'));


2. Using #attached:

Attaching External Css and Js in Drupal 8


$form['#attached']['css'] = array(
  drupal_get_path('module', 'module_name') . '/module_name.css',
);

Similar for JS

1. Using drupal_add_js():


drupal_add_js(drupal_get_path('module', 'module_name') . "/js/module_name.js");


2. Using #attached:


$form['#attached']['js'][] = array(
  'type' => 'file',
  'data' => drupal_get_path('module','module_name') . '/js/module_name.js',
);

For more detail about these you can check the api on:

  1. http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#attached
  2. http://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_process_attached/7

The above things would help you to add the required js and css files to your form or page.

But in Drupal 8, these function are deprecated and we cannot attach our css and js files directly using #attached parameter.

If you try to do so in Drupal 8 it would throw a White Screen of Death giving an error in the php log:


Uncaught PHP Exception LogicException: "You are not allowed to use js/css in #attached" at path_of_commons.inc file line 683

So in order to add css and js in Drupal 8 we need to create libraries, so that we can attach the required js and css files

Steps to add libraries:

1. We create a module_name.libraries.yml file having list of all the jss and css that we wish to use.


name_of_the_key1: // This would basically work as a key for you.
  version: 1.x
  js:
    js/js_file1.js: {}  // Name of your js file
  dependencies:  // Adding dependencies if you have any.
    - core/jquery
    - core/drupalSettings
  css:
    theme:
    css/css_file1.css: {} // Name of your css file.
 
name_of_the_key2: // This would basically work as a key for you.
  version: 1.x
  js:
    js/js_file2.js: {}  // Name of your js file
  css:
    theme:
    css/css_file2.css: {} // Name of your css file.

This would add two libraries in your module.

2. In order to attach the required js and css to your page/form, we simply replace


drupal_add_js()
drupal_add_css()

with key would be the key that you have defined in module_name.libraries.yml file.


$page['#attached']['library'][] = 'name_of_your_module/name_of_the_key2';
// Name of the key would be the key that you have defined in module_name.libraries.yml file.

So this way you can create multiple entries in your libraries.yml file and attach those libraries at specific position.

Global Training Day - Pune Drupal
Category Items

Global Training Day - Pune Drupal

Explore Pune's Drupal Global Training Day, where students delved into practical sessions on views, theming, and module development.
5 min read

This quarter's Drupal Global Training Day happened on 23rd May 2015. In association with the pune drupal community a two day workshop was conducted in Symbiosis Institute of Computer Studies & Research. The workshop was a two days program held on 23rd May 2015 and 24th May 2015 which focused on giving practical sessions on views basics, advanced views, basic Drupal theming and module development. Ajit Shinde and Saheel Sikilkar took the sessions on views along with few team members to mentor the students.

Drupal Training

In the session students were made to build there own job portal. Throughout the training practical sessions was focused on along with making flowcharts to make understanding easier.Students were keen to get their doubts cleared, this kept the session interactive.

Drupal Training

On the second day training moved to front end on Drupal, The workshop was taken up by Saket Kumar and Swastik Pareek, along with other members of Pune community helping in the lab with student doubts and queries, the workshop focussed on basic front end workflow for Drupal and also delved into custom theme development from scratch.

Drupal Training

Students were shown how to design a page using the psd designs and were given task to design their homepage for job portal which they built, the previous day. Basic module development was discussed by Dinu Mishra from the Pune community and went on to cover basic building blocks of a custom module. With that we wrapped up 2 days of engaging workshops with future Drupalers.

Few lines shared by students on the workshop:

""The sessions were quite good enough to let us understand the system from the basics. I learned many new things which I was supposed to learn. Without asking questions to them many of my confusions were cleared. Doing hands on one by one was a good technique rather than explaining everything and then doing hands on, it was a good workshop held by you guys.

-Vicky Thakkar

MSc CA, SICSR ""

""We did not have the clear idea about Drupal earlier, but the session gave us the whole idea about Drupal Development. The team which taught us Drupal was so calm and helpful, that gave a spark of interest in Drupal. 

-Dhruvesh D Tripathi

MSc CA, SICSR""

""The Drupal Workshop was an informative session where we could learn about the module and theme development and many other features which Drupal provides. There was a hands on session too that helped us to learn more about Drupal as we could practically see the outcomes.

- Surabhi Gokte

MSc CA, SICSR""

May - Drupal Monthly MeetUp
Category Items

May - Drupal Monthly MeetUp

Dive into the discussion at the May meetup as developers and themers collaborate on Drupal issues, code sprints, and networking experiences.
5 min read

We are thankful to Clarion Technologies for hosting the Pune Drupal monthly meetup on 29th May 2015 at its premises. The meetup had more than 38 active members participating into it. In this meet up we came up with an open discussion to bring basic solutions to problems faced by the frontend and backend developers. Swastik Pareek initiated the discussion by giving a brief presentation on “Bridging the gap between themer and site builder ”. Some of the things discussed in the presentation :-

  • Estimating together :-  Developer and themer should do estimations in tandem, checking feasibility and being on same page with markup consensus.
  • Common Mistakes :- The very basic and the most common mistakes done while site building were pointed in this section.
  • Reusable code :- If different pages have same designs then code should be written such that it could be reused, one should not write too much page specific codes.
  • Image Management : Discussion on image management and image presets while theming

Followed by the presentation we had a problem solving session in which all the developer discussed about their problem faced in different areas.  Following are the area of discussions taken up :-

  • Saket Kumar talked about the solutions to queries about theme development.false
  • Ajit Shinde speaking about Development in Drupal8.false
  • Piyuesh Kumar discussed about the Drupal site performance issues and solutions.false
  • Ravish Gupta from the pune drupal group talked about multilingual sites and translations.false

After this Piyuesh Kumar shared his cool experience about @DrupalConNAfalse

He talked about the keynote given by Dries Buytaertprenote. He and Saket Kumar shared their experiences about mentoring the code sprint in @DrupalConNA. He mentioned about Dries Buytaert doing live commit for a patch done by the group in code sprint at @DrupalConNA. In addition he talked about after parties :) and benefits of developer networking. The session was focussed on sharing experience which got many excited for DrupalCons Asia 2016 in Mumbai

Stay connected with us to get updates on Pune Drupal Group.

June - Drupal Monthly MeetUp
Category Items

June - Drupal Monthly MeetUp

Recap of QED42’s June Drupal Meetup featuring new learnings, tools, and community insights.
5 min read

This month Pune Drupal group had more than 75 active attendees participating in Drupal Monthly Meetup. We are thankful to Cybage Software Pvt Ltd  for hosting the event on 26th June 2015 at their premises.

Drupal Meetup

 The basic agenda of the meetup was to launch the Pune Drupal Camp 2015 website and present the camp highlights. 

Drupal Meetup

Ajit Shinde presented a session on drush which mostly focussed on drush as a deployment and remote management tool in detail. In the presentation he discussed various scenarios of remote server management using Drush and site aliases.

Drupal Meetup

To understand this in more detail you can follow this Blog :- drush as deployment and remote management.

Shubhangi Bandal presented a session on Drupal Distributions. She talked about anatomy of distributions and how to create your own with a discussion on .make files and Installation profiles. 

Drupal Meetup

After the sessions we had BoFs(Birds of Feather) where developers came together and discussed their problems in different areas of development. Following are the areas of discussions taken :-

  • Saket Kumar talked about the solutions to queries about Drupal 8 theme development.
Drupal Meetup

 

  • Ajit Shinde spoke about Drupal 8 module development.
  • Swastik Pareek explained about Drupal 7 Behaviours.
Drupal Meetup
  • Naveen Valecha stressed on Drupal performance.
  • Saheel Sikilkar discussed on Drupal to Drupal Migration.

After the BoFs Dipen talked about future of Students in Drupal.

Drupal Meetup

 He addressed about Drupal Campus Ambassador Program (DCAP) which aims to introduce Drupal to top Indian Universities and Engineering colleges by creating a network of Drupal Campus Ambassadors across different Universities and Engineering colleges of India. DCAP will be lead by core leadership and volunteers from the Indian Drupal community will travel to these colleges, evangelize Drupal and select one student who has very good insight into Open Source technologies. He mentioned that the idea behind the DCAP is to have these bright minds spreading Drupalism at the grass root level. At the end, community launched Pune Drupal Camp 2015 website and thanked members of the team who worked for the website.

Drupal Meetup

 Stay connected with us to get updates on Pune Drupal Group.

July - Drupal Monthly MeetUp
Category Items

July - Drupal Monthly MeetUp

Discover insights on Drupal, project management, productivity, and more from our July meetup. Join us for future Pune Drupal Group events!
5 min read

We are thankful to the community to give us the opportunity to host the Drupal Monthly MeetUp. The Meetup was held on 31st July 2015 with the agenda to accelerate the progress of Drupal Pune Camp 2015.

Drupal Camp

 

The Inception of the meetup was marked by Saheel Sikilkar who gave a brief insight on the Semi Automation of Publication Process using Drupal. The talk was a sharp introspection into the challenges faced and how Drupal came across as a winner to the solution. 

Drupal Camp

 

This was further followed by Prafful Nagwani who discussed about the challenges faced in Project Management from developers perpective and its solutions. He quoted that ""Productivity is directly proportional to proper time management and communication between the team is a dealbreaker solution to most of the problems.""

After the sessions we had BoFs(Birds of Feather) where developers came together and discussed problems faced in different areas of development. Following are some of the areas of discussions taken :-

  • Why we should use Drupal 8 ? which was reasoned by Dipen
  • Saheel Sikilkar talked about Editage Insights which is built completely on the concept of Semi Automation of Publication Process.
Drupal Camp

 

  • Sumit Madan shared his ideas for increasing Contributions to Open Source. How it could be a boon for everyone if focussed upon.
Drupal Camp

 

  • Piyuesh Kumar posited on How one can increase Website Performance ?​
Drupal Camp

 

After the BoFs everyone enjoyed sharing their ideas and contributions in Pune Drupal Camp 2015 website and its promotions discussions where taken up over a cup of tea. Since Pune Drupal Camp 2015 website is built on Drupal 8 it added to the experience of everyone working on it. And with this the Drupal Monthly meetup was concluded over some Pizzas, Extra loaded with ideas that were brewed over a cup of coffee and the never ending love for Drupal.

Drupal Camp

 

Stay connected with us to get more updates on Pune Drupal Group.

Higher-Ed
Healthcare
Non-Profits
DXP
Podcast
BizTech
Open Source
Events
Quality Engineering
Design Process
JavaScript
AI
Drupal
Culture