Skip to content

Instantly share code, notes, and snippets.

View mkorostoff's full-sized avatar

Jersey Len mkorostoff

View GitHub Profile
<?php
db_query('SELECT expire, value FROM {semaphore} WHERE name = :name', array(':name' => $name))->fetchAssoc();
[18-Jun-2014 02:25:07 America/New_York] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /mnt/www/html/golfchannel/docroot/includes/database/database.inc:2136
Stack trace:
#0 /mnt/www/html/golfchannel/docroot/includes/database/database.inc(2136): PDOStatement->execute(Array)
#1 /mnt/www/html/golfchannel/docroot/includes/database/database.inc(664): DatabaseStatementBase->execute(Array, Array)
#2 /mnt/www/html/golfchannel/docroot/includes/database/database.inc(2315): DatabaseConnection->query('SELECT expire, ...', Array, Array)
#3 /mnt/www/html/golfchannel/docroot/includes/lock.inc(167): db_query('SELECT expire, ...', Array)
#4 /mnt/www/html/golfchannel/docroot/includes/lock.inc(146): lock_may_be_available('theme_registry:...')
#5 /mnt/www/html/golfchannel/docroot/includes/theme.inc(447): lock_acquire('theme_registry:...')
#6 /mnt/www/html/golfchannel/docroot/includes/bootstrap.inc(427): ThemeRegistry->set(Array)
#7 [internal f
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCagT1BDpra+WQqO/8MiMv43C85J/UYh9szvW+eHUokBAE8ArqmdqSM2j5d7hsqqBVVgE+eXytUTIe/1DF3+CftiJ+aZ4NDM3qlkiQ7GliI/k6Quuw/dc/3sHwxGS/WUHnubERFienrSaUuSWePvUfEc+lHe+IHRbEY/9uUUVC1UHpfigExBmmZQ0k0sgSVjuT/qs7zF1k7u1sXs9sKZHkGHUn3aMkUNrSxJTLL6F0gUr3bAlUEo0VQePodiW5VDDe3P6poJ+51YfgK1hZEgIrcqqbAuWK/kGqE0iWGbqLh8hw8/bgl4FI29QIrNikiDv5TDeenbLUKlNf1AmcVTM2f [email protected]
diff --git a/docroot/profiles/nbcsports/modules/custom/views_rss_gfc/views_rss_gfc.field.inc b/docroot/profiles/nbcsports/modules/custom/views_rss_gfc/views_rss_gfc.field.inc
index a17bd53..f11c97f 100755
--- a/docroot/profiles/nbcsports/modules/custom/views_rss_gfc/views_rss_gfc.field.inc
+++ b/docroot/profiles/nbcsports/modules/custom/views_rss_gfc/views_rss_gfc.field.inc
@@ -270,6 +270,8 @@ function views_rss_gfc_field_formatter_view($entity_type, $entity, $field, $inst
if(array_key_exists($langcode, $field_collection->field_gallery_item_asset)) {
$image = $field_collection->field_gallery_item_asset[$langcode][0];
$uri = file_create_url($image['uri']);
+ $small_url = preg_replace('/files/', 'files/styles/mystyle/public', $uri);
+ $tablet_url = preg_replace('/files/', 'files/styles/mystyle2/public', $uri);
diff --git a/docroot/profiles/nbcsports/modules/custom/views_rss_gfc/views_rss_gfc.field.inc b/docroot/profiles/nbcsports/modules/custom/views_rss_gfc/views_rss_gfc.field.inc
index a17bd53..5a319e9 100755
--- a/docroot/profiles/nbcsports/modules/custom/views_rss_gfc/views_rss_gfc.field.inc
+++ b/docroot/profiles/nbcsports/modules/custom/views_rss_gfc/views_rss_gfc.field.inc
@@ -270,11 +270,15 @@ function views_rss_gfc_field_formatter_view($entity_type, $entity, $field, $inst
if(array_key_exists($langcode, $field_collection->field_gallery_item_asset)) {
$image = $field_collection->field_gallery_item_asset[$langcode][0];
$uri = file_create_url($image['uri']);
+ $small_url = preg_replace('/files/', 'files/styles/mystyle/public', $uri);
+ $tablet_url = preg_replace('/files/', 'files/styles/mystyle2/public', $uri);
docroot/profiles/nbcsports/modules/custom/gfc/gfc.install | 18 +-
docroot/profiles/nbcsports/modules/custom/gfc_api_json/gfc_api_json.module | 44 ++--
docroot/profiles/nbcsports/modules/custom/gfc_api_json/gfc_api_json_hpSections.inc | 209 +++++++++++++++++++
docroot/profiles/nbcsports/modules/custom/gfc_api_json/gfc_api_json_topStories.inc | 97 +--------
docroot/profiles/nbcsports/modules/custom/gfc_api_utility/gfc_api_utility.module | 180 +++++++++++++++-
docroot/profiles/nbcsports/modules/custom/gfc_mobile_app_hp/gfc_mobile_app_hp.features.field.inc | 680 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
docroot/profiles/nbcsports/modules/custom/gfc_mobile_app_hp/gfc_mobile_app_hp.features.inc | 32 +++
docroot/profiles/nbcsports/modules/custom/gfc_mobile_app_hp/gf
<?php
$users = array(
"00007ed9-199c-406e-94a1-763eca9335f2",
"00044d2b-a5a3-4ece-a45f-f7a88661146e",
"000d6f01-226f-40de-b019-37600a627ea2",
"00467407-95ae-4b9f-ad0d-911c5373bece",
"0062a682-5939-4b5e-abd3-16696448ed7b",
"00aa57d6-61b1-468d-9b74-608a10fef67d",
"00cb033f-7702-479a-8923-4d3cfeb70667",
<?xml version="1.0" encoding="utf-8" ?>
<feed>
<title type="text">Golf Channel - Golf Channel Mobile Feed</title>
<id>123456</id>
<content>Hello World</content>
</feed>
<?php
function gfc_customers_update_7001() {
//Move the scoreboard to the scoreboard region
db_update('block')
->fields(array(
'weight' => 2,
'region' => 'scoreboard_only',
))
->condition('module', 'views')
<?php
if ($condition) {
do_something():
}