View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View gist:5690827
engine: phptemplate
View gist:5690836
<?php print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'clearfix')))); ?>
View gist:5690843
<?php print render($main_menu); ?>
View gist:5690860
/**
* Implements hook_preprocess_HOOK() for page.tpl.php
*/
function busy_preprocess_page(&$variables) {
// Pass the main menu and secondary menu to the template as render arrays.
if (!empty($variables['main_menu'])) {
$variables['main_menu']['#attributes']['id'] = 'main-menu';
$variables['main_menu']['#attributes']['class'] = array('links', 'clearfix');
}
if (!empty($variables['secondary_menu'])) {
View gist:5780513
<?php
/**
* Implements hook__wysiwyg_editor_settings_alter().
*/
function MODULENAME_wysiwyg_editor_settings_alter(&$settings, $context) {
global $base_url;
if ($context['profile']->editor == 'ckeditor') {
$skins_path = drupal_get_path('module', 'MODULENAME') . '/ckeditor/skins';
View gist:5848755
<?php
/**
* Include local.settings.php
*
* The file is in .gitignore so we can safely use it for local configs.
*/
if (file_exists('sites/default/local.settings.php')) {
include('local.settings.php');
}
View install.sh
################################################################################
# Shell and drush commands to set up (or some part of it) the new site.
#
# Go to sites/all/scripts (e.g. cd sites/all/scripts) and type "sh install.sh"
# in your console/shell/Terminal.
#
# The commands are built to run once, e.g. to set some symlinks, but shall be
# designed to not break other commands on the second run.
#
################################################################################
View gist:5848762
<?php
// Database connection settings.
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'lokalerdatenbankname',
'username' => 'lokalerdatenbankbenutzer',
View update.sh
################################################################################
# Shell and drush commands to update the given installation
#
# Go to sites/all/scripts (e.g. cd sites/all/scripts) and type "sh update.sh"
# in your console/shell/Terminal.
#
# The commands have to be functional for any case after the initial installation
# installation. So on any set up after calling that script, the configuration
# must be the same.
#