in OS X 10.4 to macOS sierra 10.12 and maybe higher!
Copy this entire code block and paste it into your terminal and push Return to create this file for you with correct permissions. It will (probably) ask for your password:
in OS X 10.4 to macOS sierra 10.12 and maybe higher!
Copy this entire code block and paste it into your terminal and push Return to create this file for you with correct permissions. It will (probably) ask for your password:
| <?php | |
| /** | |
| * @file | |
| * Contains \Drupal\my_contact\Form\ContactForm. | |
| */ | |
| namespace Drupal\my_contact\Form; | |
| use Drupal\Core\Form\FormBase; | |
| use Drupal\Core\Form\FormStateInterface; |
| import { createCipheriv, createDecipheriv, randomBytes } from "crypto"; | |
| const ENCRYPTION_KEY: string = process.env.ENCRYPTION_KEY || ""; // Must be 256 bits (32 characters) | |
| const IV_LENGTH: number = 16; // For AES, this is always 16 | |
| /** | |
| * Will generate valid encryption keys for use | |
| * Not used in the code below, but generate one and store it in ENV for your own purposes | |
| */ | |
| export function keyGen() { |
| /** | |
| * WHY? - BECAUSE EXCEPTIONS/TRY/CATCH IS A GLOBAL HORRIBLE MESS :-( | |
| * Check out error handling in golang: https://blog.golang.org/error-handling-and-go | |
| */ | |
| /** | |
| * Wrap an "unsafe" promise | |
| */ | |
| function safePromise(promise) { | |
| return promise |
| diff --git a/core/modules/block_content/block_content.info.yml b/core/modules/block_content/block_content.info.yml | |
| index b9ae564..0dd5b56 100644 | |
| --- a/core/modules/block_content/block_content.info.yml | |
| +++ b/core/modules/block_content/block_content.info.yml | |
| @@ -6,6 +6,7 @@ version: VERSION | |
| core: 8.x | |
| dependencies: | |
| - block | |
| + - entity | |
| - text |
| import React from 'react'; | |
| import {storiesOf} from '@kadira/storybook'; | |
| import mockRedux from '<path-to>/js/mocks/redux'; | |
| import {Component} from '../'; | |
| const storeState = { | |
| list: ['foo', 'bar', 'baz'], | |
| someData: { | |
| foo: true, | |
| bar: false |
| <?php | |
| namespace Drupal\<yourmodulename>\EventSubscriber; | |
| use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
| use Symfony\Component\HttpFoundation\RedirectResponse; | |
| use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
| use Symfony\Component\HttpKernel\KernelEvents; | |
| /** |
Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.
To learn more about migrations, check out this article on the different types of database migrations!
| import { curry, apply } from 'ramda'; | |
| /** | |
| * Debounce | |
| * | |
| * @param {Boolean} immediate If true run `fn` at the start of the timeout | |
| * @param timeMs {Number} Debounce timeout | |
| * @param fn {Function} Function to debounce | |
| * | |
| * @return {Number} timeout |