Initially taken by Niko Matsakis and lightly edited by Ryan Levick
- Introductions
- Cargo inside large build systems
- FFI
- Foundations and financial support
version: '3.6' | |
services: | |
postgres: | |
image: postgres:12 | |
restart: always | |
volumes: | |
- db_data:/var/lib/postgresql/data | |
environment: | |
POSTGRES_PASSWORD: postgrespassword | |
graphql-engine: |
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 |
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!
<?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; | |
/** |
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 |
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 |
/** | |
* 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 |
'use strict'; | |
const crypto = require('crypto'); | |
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters) | |
const IV_LENGTH = 16; // For AES, this is always 16 | |
function encrypt(text) { | |
let iv = crypto.randomBytes(IV_LENGTH); | |
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv); |
<?php | |
/** | |
* @file | |
* Contains \Drupal\my_contact\Form\ContactForm. | |
*/ | |
namespace Drupal\my_contact\Form; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormStateInterface; |