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
| curl -s https://www.drupalvmgenerator.com/download -L -o drupalvm-generate.phar |
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
| drupalvm config:generate \ | |
| --hostname=example.com \ | |
| --machine-name=example \ | |
| --ip-address=192.168.88.88 \ | |
| --cpus=1 \ | |
| --memory=512 \ | |
| --webserver=nginx \ | |
| --path=../site \ | |
| --destination=/var/www/site \ | |
| --docroot=/var/www/site/drupal \ |
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
| 'use strict' | |
| var gulp = require('gulp'); | |
| var plugins = require('gulp-load-plugins')(); | |
| var del = require('del'); | |
| var config = {}; | |
| var app = {}; |
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
Show hidden characters
| { | |
| "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
| "default_line_ending": "unix", | |
| "ensure_newline_at_eof_on_save": true, | |
| "fallback_encoding": "UTF-8", | |
| "folder_exclude_patterns": | |
| [ | |
| ".idea", | |
| ".git", | |
| ".github", |
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 | |
| rm -rf drupalvm.phar drupalvm.phar.version | |
| box build | |
| shasum drupalvm.phar | awk '{print $1}' > drupalvm.phar.version |
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
| tap 'caskroom/cask' | |
| tap 'caskroom/fonts' | |
| tap 'caskroom/versions' | |
| tap 'homebrew/dupes' | |
| tap 'homebrew/php' | |
| tap 'homebrew/services' | |
| brew 'cairo' | |
| brew 'composer' | |
| brew 'direnv' |
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 | |
| require __DIR__ . '/vendor/autoload.php'; | |
| use Opdavies\GmailFilterBuilder\Builder; | |
| use Opdavies\GmailFilterBuilder\Filter; | |
| $filters[] = Filter::create() | |
| ->has('from:[email protected]') |
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 | |
| require 'vendor/autoload.php'; | |
| use Symfony\Component\Finder\Finder; | |
| // Find all posts. | |
| $files = Finder::create()->files()->in('../source/_posts')->name('*.md'); | |
| foreach ($files as $file) { |
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
| $icons: ( | |
| camera: 'factsheet_bg.png', | |
| ebook: 'library_bg.png', | |
| newsletter: 'newsletter_bg.png', | |
| pages: 'project_results_bg.png', | |
| publications: 'publications_bg.png', | |
| youtube: 'youtube_bg.png', | |
| ); | |
| @each $class, $filename in $icons { |
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 | |
| // https://twitter.com/codebyjeff/status/1057057070460022784 | |
| $array1 = ['col1' => 2, 'col2' => 5]; | |
| $array2 = ['col1' => 4, 'col2' => 1]; | |
| $array_total = collect($array1)->zip($array2) | |
| ->map->sum(); |