For Homebrew v2.6.x and below:
brew cask install ngrokFor Homebrew v2.7.x and above:
| // Get image settings array from a field on the node | |
| $image = field_get_items('node', $node, 'INSERT_IMAGE_FIELD_MACHINE_NAME'); | |
| // Picture settings | |
| $picture_mapping = picture_mapping_load('INSERT_PICTURE_MAPPING_MACHINE_NAME'); | |
| $fallback = 'INSERT_IMAGE_STYLE_MACHINE_NAME'; | |
| $breakpoints = picture_get_mapping_breakpoints($picture_mapping, $fallback); | |
| // Create a new variable to pass through to the node template | |
| $variables['INSERT_NEW_VARIABLE_NAME_TO_PASS_TO_NODE_TEMPLATE'] = theme('picture', array('uri' => $image[0]['uri'], 'style_name' => $fallback, 'breakpoints' => $breakpoints)); |
| /** | |
| * @file | |
| * | |
| * Overrides the default Ajax progress indicator to do things like change the | |
| * styling and positioning. | |
| */ | |
| (function ($) { | |
| // Drupal's core beforeSend function | |
| var beforeSend = Drupal.ajax.prototype.beforeSend; |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
| name: 'Ajax Example' | |
| description: 'Just an Ajax Example' | |
| core: 8.x | |
| type: module |
| //This input should be from somewhere else, hard-coded in this example | |
| $file_name = '2013-07-16.dump.gz'; | |
| // Raising this value may increase performance | |
| $buffer_size = 4096; // read 4kb at a time | |
| $out_file_name = str_replace('.gz', '', $file_name); | |
| // Open our files (in binary mode) | |
| $file = gzopen($file_name, 'rb'); | |
| $out_file = fopen($out_file_name, 'wb'); | |
| // Keep repeating until the end of the input file | |
| while(!gzeof($file)) { |
| <?php | |
| drupal_add_js('misc/ajax.js'); | |
| ctools_add_js('modal'); | |
| ctools_add_css('modal'); | |
| // Add your modal style to the settings. You find the defaults in modal.js near the top: | |
| drupal_add_js(array( | |
| 'my-modal-style' => array( | |
| 'modalSize' => array( |
| [mysqld] | |
| init_connect='SET collation_connection = utf8mb4_unicode_ci' | |
| init_connect='SET NAMES utf8mb4' | |
| character-set-server = utf8mb4 | |
| character-set-client = utf8mb4 | |
| collation-server = utf8mb4_unicode_ci | |
| skip-character-set-client-handshake | |
| innodb_file_format = Barracuda |