Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* @file
* local.settings.php (Drupal 6.x)
*
* This settings file is intended to contain settings specific to a local
* development environment, by overriding options set in settings.php.
*
* Include this file from your regular settings.php by including this at the
* bottom:
<?php
/**
* @file
* local.settings.php
*
* This settings file is intended to contain settings specific to a local
* development environment, by overriding options set in settings.php.
*
* Include this file from your regular settings.php by including this at the
* bottom:
<?php
/**
* This is example code for a Drupal 6 to Drupal 7 migration. This won't actually
* work without defining the referenced vocabularies, content types, and fields
* on each side.
*/
/**
* Implements hook_flush_caches().
@welly
welly / gist:9488754
Created March 11, 2014 15:56
MySQL: Update field in table from another table via several joins
update field_data_field_user_about f
join profile p on f.entity_id = p.pid
join node n on p.uid = n.uid
join content_type_profile c on c.nid = n.nid
set f.`field_user_about_value` = c.`field_user_about_value`
$data = array(
'bundles' => array(
'innovation' => (object) array(
'type' => 'innovation',
'name' => 'Innovation',
'base' => 'node_content',
'module' => 'node',
'description' => '',
'help' => '',
'has_title' => '1',
@welly
welly / px-to-em.scss
Created August 5, 2013 13:55
PX to EM conversion functions
// Functions for px to em conversions
// ------------------------------------------------------------
@function emify($target, $context) {
@if $target == 0 { @return 0 }
@return $target / $context + 0em;
}
// Make px to ems using base-font-size
// echo as: font-size: em-font(#px);