Skip to content

Let's say you're editing a file in VIM, and want to see a diff between your current unsaved version and what's on the hard disk. Turns out you can just type this:

:w !git diff --no-index % -

What this does it pipes the whole contents of the current file to the command git diff --no-index % - The % symbol is substituted by vim to be the path to the saved file. The - tells git diff to read from STDIN.

View print_pdf_wkhtmltopdf.pipes.patch
diff --git a/sites/all/modules/contrib/print/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/ b/sites/all/modules/contrib/print/print_pdf/lib_
index 3e86f97..87fdfc8 100644
--- a/sites/all/modules/contrib/print/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/
+++ b/sites/all/modules/contrib/print/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/
@@ -49,21 +49,30 @@ function print_pdf_wkhtmltopdf_print_pdf_generate($html, $meta, $paper_size = NU
$wkhtmltopdf_options .= ' --username ' . check_plain($_SERVER['PHP_AUTH_USER']) . ' --password ' . check_plain($_SERVER['PHP_AUTH_PW']);
- $descriptor = array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'a'));
- $cmd = '"' . realpath($pdf_tool[1]) . "\" --page-size $paper_size --orientation $page_orientation --dpi $dpi $wkhtmltopdf_options - -";
* @file
* Implements hook_ctools_plugin_api().
function lf_hellosign_ctools_plugin_api($module = NULL, $api = NULL) {
name = EW Mobile Switcher
description = Allows switching to desktop version and back on mobile site.
dependencies[] = block
core = 7.x
name = "EW Hellosign"
description = "Test Hellosign integration"
package = "Custom"
core = 7.x

How SaSS and Bourbon Neat can help those websites running behind

It's 2015, we are already in the "Mobile Era" and we all love how our modern sites fit and adapt to any screen. Of course, modern sites: pretty nice and flexible, stretching even to the 52 inches of a Samsung TV, High Resolution images... Its is just amazing. But you know what? We cannot forget there are almost 20 years of "non-mobile" websites out there, screaming to be upgraded. And the first word that comes out to our mind is pretty simple: "redesign".

Redesign means Higher Cost

Mobile OS manufacturers trend to improve their browsers to allow resizing, double tap zooming and dragging around, but it is just an actual usability workaround. It is like going to a disco that has mandatory night vision goggles to get in because it didn't had lighting setup when buil(weird huh?). You will end up in the floor, hating both: the goggles and the disco. You but you will still want to dance, so bye bye "Goggle Disco" and you'll go for a new one.


Poor man's node_export, aka node smuggling

I needed to create a new webform on a production site recently. But as a dev, I don't have direct access to the production admin backend; I'm only allowed to push code changes and let the client's team migrate them to prod via drush updb. So I'm supposed to export the webform configuration to code, and deploy it via an update hook, but how?

Because webform nodes are content not configuration, the Features module doesn't help. We generally use the Migrate module with CSVs for content staging, but the thought of exporting arbitrary webform config to CSV gives me the heebie jeebies. The happy medium is node_export, that old-school module that gives a simple UI to export, copy-and-paste, and import a node's configuration across two sites. And using it would work, but would require maintaining its 30

View webform-output.php
array (
'nid' => '27',
'next_serial' => '1',
'confirmation' => '',
'confirmation_format' => NULL,
'redirect_url' => '<confirmation>',
'status' => '1',
'block' => '0',
'allow_draft' => '0',
'auto_save' => '0',
View gist-sitediff.yaml
- title: Strip domain names from absolute URLs
pattern: http:\/\/[a-zA-Z0-9.:-]+
substitute: __domain__
disabled: true
- /
Something went wrong with that request. Please try again.