js-funny

Add inline javascript using drupal_add_js

In order to add inline javascript code to your static drupal 7 content. Enable “PHP Filter” module from admin/modules page. This will provide you with a php filter on content types. Warning: It is not recommended to use this module as it puts your site’s security at risk. Goto node/add/page and select “PHP code” from “Text Format” In body of …

drupal-7table

Drupal 7 Collapsible Table Row

On a Drupal 7 project we had a huge drupal custom table (more than 400 items; scheduling items like google calendar) with drag and drop. It was getting difficult for administrators to manage it every day. To solve this we decided to make rows collapsible! Demo collapsible row table: http://drupal-playground.proportional.io/drupal-7-collapsible-row-table Here is some custom code we developed to solve this …

drupal-blog

How to programmatically pass many arguments for views contextual filters

To programmatically pass multiple arguments for views contextual filters $og_nid = 2; // nid of a organic group node $uid = 1; //user id of a user $view = views_get_view(‘user_session_reviews’); $view->set_display(‘default’); $args_array = array($og_nid, $uid); // to set multiple arguments $view->set_arguments($args_array); $view->pre_execute(); $view->execute();

Bulb-funny-s3

How to download files from s3 bucket using wget

To download file from s3 bucket to your server that don’t have s3cmd installed, but have wget. $wget https://backups.s3.amazonaws.com/database.sql.gz?Signature=UcJYuJFBzQyc4p7Y9R5K3W7Opm command fails with HTTP request sent, awaiting response… 403 Forbidden To resolve this error use: wget –no-proxy –no-check-certificate ‘https://backups.s3.amazonaws.com/database.sql.gz?Signature=UcJYuJFBzQyc4p7Y9R5K3W7Opm’

164061_172642282773811_4915806_n

MeteorJS Blog One

Something cool about MeteorJS. WOW this is a cool start. I want it to be rocking.