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
vcl_recv { | |
if (!req.http.cookie ~ "site_intro" && !req.url ~ "^/intro" && !req.http.user-agent ~ "(?i)\biPhone.*Mobile.MobileDetect") { | |
error 750 "Moved Temporarily"; | |
} | |
... | |
} | |
vcl_error { |
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 | |
$args = array( 'post_type' => 'MYPOSTTYPE', 'posts_per_page' => 1 ); | |
$loop = new WP_Query( $args ); | |
while ( $loop->have_posts() ) : $loop->the_post(); | |
the_title(); | |
include 'single-MYPOSTTYPE.php'; | |
endwhile; | |
?> |
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 a node, using a panel node template override, into Search index | |
* - search_api | |
* - search_api_solr | |
*/ | |
/** | |
* Implements hook_entity_property_info_alter(). | |
*/ | |
function MY_SEARCH_entity_property_info_alter(&$info) { |
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
'source-command-specific' => array ( | |
'sql-sync' => array ( | |
'no-cache' => TRUE, | |
'structure-tables-key' => 'common', | |
), | |
), | |
'command-specific' => array ( | |
'sql-sync' => array ( | |
'structure-tables' => array( | |
'common' => array('cache', 'cache_block', 'cache_content', 'cache_filter', 'cache_form', 'cache_menu', 'cache_page', 'cache_rules', 'cache_update', 'cache_views', 'cache_views_data', 'ctools_css_cache', 'ctools_object_cache', 'search_dataset', 'search_index', 'search_node_links', 'search_total', 'accesslog', 'history', 'watchdog') |
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
drush @source sql-dump --database=remote_one_legacy --skip-tables-list=cache,cache_path,cache_form | drush @target sql-cli --database=remote_two_legacy |
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
/* | |
* Utility to change the max length of a text field | |
* @see http://nathan.rambeck.org/blog/42-modify-drupal-7-text-field-maximum-length | |
* | |
* @param string the field name to update | |
* @param integer the new field length | |
*/ | |
function mymodul_change_text_field_max_length($field_name, $new_length) { | |
$field_table = 'field_data_' . $field_name; | |
$field_revision_table = 'field_revision_' . $field_name; |
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
' http://support.microsoft.com/kb/291296/en-us | |
' http://superuser.com/questions/130592/how-do-you-force-excel-to-quote-all-columns-of-a-csv-file | |
' - change integer to long indexing | |
' http://stackoverflow.com/questions/2524703/save-text-file-utf-8-encoded-with-vba | |
' - output utf8 content | |
Sub QuoteCommaExport() | |
' Dimension all variables. | |
Dim DestFile As String | |
Dim FileNum As Integer |
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
function __the_end(){ | |
if(($err=error_get_last())) | |
die('<pre>'.print_r($err,true).'</pre>'); | |
} | |
register_shutdown_function('__the_end'); |
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
/* | |
* Facets Widgets | |
**/ | |
function HOOK_facetapi_facet_info() { | |
$facets = array(); | |
$facets['ss_company_facet'] = array( | |
'field' => 'ss_company', | |
'label' => t('Company'), |
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
ps -e -orss=,args= | sort -b -k1,1n |
OlderNewer