Skip to content

Instantly share code, notes, and snippets.

View jussiviitamaki's full-sized avatar

Jussi Viitamäki jussiviitamaki

View GitHub Profile
Section "InputClass"
Identifier "X1 carbon stuff"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "synaptics"
# Enable two finger scrolling vertically, disable horizontally
Option "VertTwoFingerScroll" "1"
Option "HorizTwoFingerScroll" "0"
@jussiviitamaki
jussiviitamaki / gist:7367880
Created November 8, 2013 08:16
Generic diff function to diff node field current and original valeu on presave
function _my_module_diff_field_values($node, $field_name) {
$array_a = array();
$array_b = array();
if(!empty($node->{$field_name})) {
foreach($node->{$field_name}[LANGUAGE_NONE] as $key => $value) {
if(isset( $value['nid'])) {
$array_a[] = $value['nid'];
}