Skip to content

Instantly share code, notes, and snippets.

<div class="home-banner-contact">
<div class="home-banner-contact-callout">
<div class="home-banner-contact-learn">Learn how you can benefit from a <strong>cloud solution</strong></div>
%token:marketplace_live_person:marketplace_liveperson_homepage
<div class="home-banner-contact-phone">%token:theme:partner_phone</div>
<div class="home-banner-contact-consult"><a href="#" class="home-open-consultation">Arrange a Consultation &raquo;</a></div>
<div class="home-consultation-wrapper">
<div class="home-consultation-top"></div>
<div class='title'>
We're in the United Kingdom. Deploy your cloud servers and private cloud today!
</div>
<ul class="clearfix">
<li class="home-solutions-email clickable">
<img src="/sites/default/files/ribbon_orange.png" class="corner-ribbon">
<h2>Email &amp; Collaboration for Business</h2>
Enhance productivity and data security with email, IM, file sharing, email archiving & PC backup.
<a href="/online-collaboration-bundle" title="Serverless Exchange">Shop Collaboration Bundles &raquo;</a>
</li>
$fax_fc = entity_create('field_collection_item', array('field_name' => 'field_fax'));
$fax_fc->setHostEntity('commerce_customer_profile', $profile);
$fax_fc_wrapper = entity_metadata_wrapper('field_collection_item', $fax_fc);
$fax_fc_wrapper->field_telephone_country_code->set($account_details['faxCountryCode']);
$fax_fc_wrapper->field_phone_fax_number->set($account_details['faxNumber']);
$fax_fc_wrapper->field_extension_code->set($account_details['faxExtension']);
$fax_fc_wrapper->save(true);
$phone_fc = entity_create('field_collection_item', array('field_name' => 'field_phone'));
function field_collection_field_widget_embed_validate($element, &$form_state, $complete_form) {
$instance = field_widget_instance($element, $form_state);
$field = field_widget_field($element, $form_state);
$field_parents = $element['#field_parents'];
$field_name = $element['#field_name'];
$language = $element['#language'];
$field_state = field_form_get_state($field_parents, $field_name, $language, $form_state);
dpm('LETS SEE IF THIS SHIT EXISTS');
dpm('$form_state');
dpm($form_state);
@kraigh
kraigh / test.php
Last active August 29, 2015 14:00
<?php
if (function_exists($function)) {
$context = array_merge($context, $params);
$actions_result[$action_id] = $function($object, $context, $a1, $a2);
}
else {
$actions_result[$action_id] = FALSE;
}
?>
@kraigh
kraigh / gist:dd85531d7958f7822046
Created April 30, 2014 13:25
production merge
$ git merge ZIMEHI-137-vanpool-import
Auto-merging v3/application/configuration/config.ini
Merge made by the 'recursive' strategy.
v3/application/configuration/config.ini | 2 +-
.../default/controllers/AdminController.php | 52 ++++++-
.../default/views/university/layouts/footer.tpl | 8 +-
.../university/scripts/admin/bookingmanagement.tpl | 97 ++++++++---
.../views/university/scripts/booking/book.tpl | 8 +-
.../university/scripts/booking/driverresponse.tpl | 11 ++
.../university/scripts/onetimebookings/new.tpl | 2 +-
@kraigh
kraigh / newoffice.md
Last active August 29, 2015 14:03
New Office

Kraig's list of Upsides/Downsides for the new office

Downsides

  • 50% smaller cubes for sr. developers
  • 50% more bland overall color scheme
  • 100% less fountains
  • 95% fewer food options
  • Its friggen cold

Upsides

{if $master_ride->notes|escape}
<p class="notes">{$master_ride->notes}</p>
{/if}
// Titanium Mobile code for slider control functionality
//----------------------------------------
// @CJ_Reed 23rd Dec 2010
var sliderView = Titanium.UI.createView({top:100,height:50,left: 40,width:240,backgroundColor:'#000'});
var sliderButton = Titanium.UI.createView({width:96,borderRadius:5,backgroundColor:'#bbb',height:sliderView.height,left:sliderView.left,top:sliderView.top});
Titanium.UI.currentWindow.add(sliderView);
Titanium.UI.currentWindow.add(sliderButton);
function unlock (){
if (strpos($message, ' ') === false) {
throw new UnexpectedValueException('Cannot split a 160+ char text message without spaces, WTF');
}