==> default: Exporting NFS shared folders...
NFS is reporting that your exports file is invalid. Vagrant does
this check before making any changes to the file. Please correct
the issues below and execute "vagrant reload":
exports:2: path contains non-directory or non-existent components: /Users/<username>/path/to/vagrant
exports:2: no usable directories in export entry
exports:2: using fallback (marked offline): /
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Import arbitrary config from a variable. | |
| // Assumes $data has the data you want to import for this config. | |
| $config = \Drupal::service('config.factory')->getEditable('filter.format.basic_html'); | |
| $config->setData($data)->save(); | |
| // Or, re-import the default config for a module or profile, etc. | |
| \Drupal::service('config.installer')->installDefaultConfig('module', 'my_custom_module'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Example extends SourcePluginBase { | |
| public function prepareRow(Row $row) { | |
| parent::prepareRow($row); | |
| // I do some data manipulation to end up with an array that looks like this, | |
| // which I want to import into multi-value link field. | |
| $links = [ |
¯\_(ツ)_/¯
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // paste it in your config.user.php configuration file in section files: {} | |
| "syslog": { | |
| "display" : "Drupal", | |
| "path" : "\/var\/log\/drupal.log", //set your Drupal syslog file path | |
| "refresh" : 5, | |
| "max" : 10, | |
| "notify" : true, | |
| "order" : -1,//set order you want | |
| "sort" : "Date", | |
| "thinit" : [ "Date", "Site", "Type", "Request", "Referer", "UID", "Message" ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This gist contains pre-commit hooks to prevent you from commiting bad code or to the wrong branch. | |
| # There are six variants that I have built: | |
| # - pre-commit: stops commits to master/main/develop branches. | |
| # - pre-commit-2: also includes a core.whitespace check. | |
| # - pre-commit-3: the core.whitespace check and an EOF-newline-check. | |
| # - pre-commit-4: only the core.whitespace check. | |
| # - pre-commit-5: elixir formatting check. | |
| # - pre-commit-6: prettier formatting check. | |
| # Set the desired version like this before proceeding: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copy this into your command prompt to manually flush memcache. | |
| # Replace localhost.com with the domain name of the drupal site. | |
| drush ev "dmemcache_flush()" --uri="localhost.com" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Compress git repos (git gc) recursively | |
| # Use as at will, by @nvk | |
| gspace(){ | |
| for gitdir in `find ./ -name .git`; | |
| do | |
| workdir=${gitdir%/*}; | |
| hrline 44; # see http://gist.github.com/nvk/5340820 | |
| echo $workdir; | |
| git --git-dir=$gitdir --work-tree=$workdir gc --aggressive; |
At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)
Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.