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
/** | |
* Retun campaign stats with use reduce-map approach. | |
* | |
* @TODO This method is not used anywhere, just adding, so that in future we can have refrence to reduce-map approach. | |
* @param $campaign_id | |
* @return mixed | |
*/ | |
public function countEmailreportByCampaignMap($campaign_id) | |
{ | |
$map = 'function() { |
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 --git a/token_insert.module b/token_insert.module | |
index 311379a..8a826ff 100644 | |
--- a/token_insert.module | |
+++ b/token_insert.module | |
@@ -186,6 +186,9 @@ function theme_token_insert_tree() { | |
$rows[] = $row; | |
} | |
} | |
+ | |
+ // Add hook for altering tokens |
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
require_once DRUPAL_ROOT . '/includes/locale.inc'; | |
$countries = country_get_list(); | |
foreach ($countries as $code => $name) { | |
$new_countries[$code]['name'] = $name; | |
$fmt = new IntlDateFormatter( | |
$code, | |
IntlDateFormatter::SHORT, | |
IntlDateFormatter::SHORT | |
); | |
$pattern = $fmt->getPattern(); |
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
include_once('simple_html_dom.php'); | |
// TODO there are 38 pages, run this script in 38 loops, change the page value of page. | |
$html = file_get_html('https://amsterdam2014.drupal.org/attendees?field_badge_first_name_value=&field_badge_last_name_value=&field_badge_org_value=&uid=&field_badge_country_value=All&page=8'); | |
$details = array(); | |
$index = 0; | |
foreach($html->find('div.view-id-attendees ul li') as $li) { | |
// User name. | |
foreach($li->find('div.views-field-name') as $data) { | |
$do_username = $data->plaintext; | |
$details[$index]['username'] = $do_username; |
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
#!/bin/bash | |
# Clear complete cache in multiple web server | |
if [ -z $1] | |
then | |
curl -X BAN http://54.254.102.251/ | |
curl -X BAN http://54.251.248.135/ | |
# Clear cache of specific page | |
else |
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 | |
include 'XML_File.php'; | |
$pos1 = 0; | |
$pos2 = 0; | |
$pos3 = 0; | |
$pos4 = 0; | |
$email_pos_open = 0; | |
$email_pos_close = 0; | |
$name_pos_close = 0; |