This file contains hidden or 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
/** | |
* Adds auth to update request (post) | |
* | |
* @param $update | |
* | |
* @return $update | |
*/ | |
function update($update) { | |
$request = $this->client->createRequest($update); | |
$endpoint = $this->client->getEndpoint(); |
This file contains hidden or 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
/** | |
* Adds auth to query request (get) | |
* | |
* @param $query | |
* | |
* @return $resultSet | |
*/ | |
function query($query) { | |
$request = $this->client->createRequest($query); | |
$endpoint = $this->client->getEndpoint(); |
This file contains hidden or 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
/** | |
* Update a Solarium client object for an 'Update' query | |
* with acquia authentication | |
* | |
* Needs to add following to, Solarium\Plugin\BufferedAdd\BufferedAdd.php:flush() | |
* after addDocuments call, so all flush queries get auth cookies: | |
* | |
* $sdsSolrBase = new SolrBase(); | |
* $this->client = $sdsSolrBase->clientAttachAuth($this->client, $this->updateQuery); | |
* |
This file contains hidden or 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
# .platform/services.yaml | |
marketplace-database: | |
type: mysql:5.5 | |
disk: 2048 | |
marketplace-search: | |
type: solr:4.10 | |
disk: 2048 | |
marketplace-redis: | |
type: redis:2.8 | |
This file contains hidden or 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
git branch --merged master | grep -v master | xargs git branch -d |
This file contains hidden or 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 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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; |