Install and configure https://github.com/jedisct1/piknik
Host ips need to be static or have a dns.
Add the bash aliases (either mac or linux) for easy copy/paste directly from clipboard to Piknik.
Install and configure https://github.com/jedisct1/piknik
Host ips need to be static or have a dns.
Add the bash aliases (either mac or linux) for easy copy/paste directly from clipboard to Piknik.
| echo "LABEL=DRIVELABEL none ntfs rw,auto" >> /etc/fstab |
| exports.handler = (event, context, callback) => { | |
| const request = event.Records[0].cf.request; | |
| if (request.headers['host'][0].value !== 'www.example.com') { | |
| /* | |
| * Generate HTTP redirect response with 302 status code and Location header. | |
| */ | |
| const response = { | |
| status: '302', | |
| statusDescription: 'Found', |
| # https://stackoverflow.com/questions/32431465/mamp-ssl-error-error14077410ssl-routinesssl23-get-server-hellosslv3-alert | |
| 1. brew install openssl | |
| 2. Download and unpack the latest cURL | |
| 3. In the cURL source directory: | |
| LDFLAGS="-L/usr/local/opt/openssl/lib" CPPFLAGS="-I/usr/local/opt/openssl/include" ./configure --prefix=/Applications/MAMP/Library/ | |
| 4. make | |
| 5. make install | |
| 6. Restart MAMP |
| <?php | |
| $user = $node->uid->entity; | |
| $email = $node->uid->entity->mail->value; |
| <?php | |
| $url = \Drupal\Core\Url::fromRoute('entity.node.canonical', array('node' => $nid), array('absolute' => TRUE))->toString(); |
| module_name.my_page_form: | |
| route_name: module_name.my_page_form | |
| base_route: entity.node.canonical | |
| title: 'My Form Page' | |
| weight: 5 |
| <?php | |
| // To be passed to hook_mail | |
| $params = array(); | |
| // To be passed to hook_mail | |
| $key = 'my_mail_key'; | |
| $langcode = \Drupal::languageManager()->getDefaultLanguage(); | |
| \Drupal::service('plugin.manager.mail') |
| <?php | |
| // For field of type datestamp | |
| db_insert('table') | |
| ->fields(array( | |
| 'created' => date_create()->format('Y-m-d H:i:s'), | |
| )) | |
| ->execute(); |
| <?php | |
| $module = 'module_name'; | |
| $name = 'table_name'; | |
| $table = drupal_get_module_schema($module, $name); | |
| db_create_table($name, $table); |