Git default configuration is good but it can be personalized to improve your workflow efficiency.
Here are some good lines to put in your ~/.gitconfig
:
# The basics, who you commit as:
[user]
name = John Doe
email = john@doe.org
{# Create classes array. The 'node' class is required for contextual edit links. #} | |
{% set categories = [] %} | |
{% set classes = ['integration', 'node'] %} | |
{% for key, item in content.field_integration_cat if key|first != '#' %} | |
{% set categories = categories | merge([ item['#title'] | replace({' ':''}) ]) %} | |
{% endfor %} | |
{% for item in categories %} | |
{% set classes = classes | merge([item]) %} |
$a = array('a', 'b', array(array(array('1'), '2', '3')), array(array('xyz'))); | |
function make_flat($array,$result) { | |
for($i = 0; $i <= count($array); $i++) { | |
if(is_array($array[$i])) { | |
$result = make_flat($array[$i], $return); | |
} | |
else { | |
if(isset($array[$i])) { | |
$result[] = $array[$i]; |
<?php | |
namespace MurdockTrust\MurdockTrust\Widgets; | |
class MurdockTrust_WidgetSetup { | |
public $widget_class = ''; | |
public $admin_styles = array(); | |
public $admin_scripts = array(); | |
public $front_styles = array(); | |
public $front_scripts = array(); |
<?php | |
function clearesult_subsolar_preprocess_html(&$variables) { | |
drupal_add_css(drupal_get_path('theme', 'clearesult_subsolar') .'/build/scripts/vendor/pure.css', array('group' => CSS_SYSTEM)); | |
drupal_add_css('//fonts.googleapis.com/css?family=Cabin:400,600', array('group' => CSS_SYSTEM)); | |
} | |
function clearesult_subsolar_preprocess_page(&$variables) { | |
drupal_add_js(drupal_get_path('theme', 'clearesult_subsolar') .'/build/scripts/vendor/modernizr-2.8.3.min.js', array("group" => JS_LIBRARY, "weight" => 115)); | |
drupal_add_js(drupal_get_path('theme', 'clearesult_subsolar') .'/build/scripts/vendor/jquery-maskedinput.min.js', array("group" => JS_LIBRARY, "weight" => 115)); |
<?php | |
get_header(); | |
global $slider_meta; | |
?> | |
<?php | |
// Start the loop. | |
while (have_posts()) : the_post(); | |
// If comments are open or we have at least one comment, load up the comment template. |
git rm -r --cached . | |
git add -A | |
git commit -am 'Removing ignored files' |
<?php | |
function update_domain_enable() { | |
domain_bootstrap_register(); | |
} | |
function update_domain_domain_bootstrap_full($domain) { | |
if (function_exists('drush_verify_cli') || function_exists('update_prepare_d7_bootstrap')) return; | |
module_invoke('update_domain', 'initialize', 'domain'); |