This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Export serialized data containing fields attached to an Entity. Example used when Features not installed. | |
*/ | |
function MODULE_NAME_install() { | |
drupal_install_schema(SCHEMA_NAME); | |
MODULE_NAME_add_entity_fields(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Creates a plugin that in this example was used in the Feeds Importer module. Plugin can execute PHP against values passed to it. | |
*/ | |
$plugin = array( | |
'form' => 'MODULE_NAME_PLUGIN_NAME_form', | |
// Optional validation callback. | |
'validate' => 'MODULE_NAME_PLUGIN_NAME__validate', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Create form for alert message entry and render a block with message if message is not empty. Blocked place in header in this example with custom CSS. | |
*/ | |
/** | |
* Implements hook_menu(). | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Creates a custom token. In this case this token was sent to Google Analytics. | |
*/ | |
function example_token_info() { | |
$info['tokens']['site']['active_alert'] = array( | |
'name' => t('Active Alert'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* A test case for adding visibility settings of Desktop, Tablet and Mobile to Drupal block rendering. Dropped instead for Context + Mobile Detect Library | |
*/ | |
define('MOBILE_DETECT_LIBRARY_PATH', '/sites/all/libraries/Mobile_Detect'); | |
/** | |
* Implements hook_form_alter(). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$defaults = array( | |
'value' => '', | |
'format' => filter_default_format(), | |
); | |
$example = variable_get('example_variable', $defaults); | |
$form_['example'] = array( | |
'#title' => t(''), | |
'#type' => 'text_format', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo iwlist wlan0 scan | grep \(Channel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ADD TO END OF FILE | |
# Add headers to all responses. | |
<IfModule mod_headers.c> | |
# Disable content sniffing, since it's an attack vector. | |
Header always set X-Content-Type-Options nosniff | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DIFF REPLACE | |
-$conf['404_fast_paths_exclude'] = '/\/(?:styles)\//'; | |
+$conf['404_fast_paths_exclude'] = '/\/(?:styles)|(?:system\/files)\//'; | |
# ADD TO END OF FILE | |
/** | |
* Theme debugging: | |
* | |
* When debugging is enabled: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfcontent type="text/html; charset=UTF-8"> | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>Sanitize target="_blank"</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.slim.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
/* 3/24/2017 Sanitize_Target_Blank.htm https://gist.github.com/JamoCA/80f65eb07f054b1326221bd4f15868d6 */ | |
function sanitizeTargetBlank(){ | |
$('#linkDiv a[rel~=external]').prop('target', '_blank'); |
OlderNewer