Skip to content

Instantly share code, notes, and snippets.

View dergachev's full-sized avatar

Alex Dergachev dergachev

View GitHub Profile
Thailand tips from lauri
Khao lak
Phi phi ,, take an early morning 6am speed boat. Worth the 100eur
But getting really crowded at 9am.
The Beach movie was shot there
Krabi islands and beaches, more
Take an Uber around Phuket , has a tour option
Panwa beach is less crowded
Also Phuket city
@dergachev
dergachev / alex-tools.md
Last active August 13, 2016 09:45
The tools I use.

Tools we use for PM for project management and communication

  • LaTeX for company proposals, converted via custom script to google docs
  • git for code and structured docs
  • dropbox for screenshots and file sharing
  • markdown (in github) and textile (in redmine)
  • markdown for blog posts and presentations
  • Vim for code and text editing

Communication:

Carter Digital Project Planner

Thank you for downloading the Carter Digital Project Planner. Carter Digital website/application projects start at $20,000 AUD. This document is intended to help us to align the unique aspects of your project to our capabilities and availability. Please fill out with as much information as you can, resave the file to yourcompanyname.doc and email the document to hello@carterdigital.com.au Please allow 7 working days for us to respond to your enquiry.

General Information

Primary:

@dergachev
dergachev / vim-diff-against-saved-file.md
Last active March 10, 2021 11:24
VIM snippet to show diff of unsaved changes.

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.

diff --git a/sites/all/modules/contrib/print/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/print_pdf_wkhtmltopdf.pages.inc 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/print_pdf_wkhtmltopdf.pages.inc
+++ b/sites/all/modules/contrib/print/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/print_pdf_wkhtmltopdf.pages.inc
@@ -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 - -";
<?php
/**
* @file
* lf_hellosign.features.inc
*/
/**
* 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
@dergachev
dergachev / sass.md
Last active October 19, 2015 22:07 — forked from jorgediazgutierrez/sass.md
How SaSS and Bourbon Neat can help those websites running behind

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.