This file contains 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/sh | |
#===================================================================== | |
# pingtest.sh | |
# ----------- | |
# Inspiration: https://forum.netgate.com/topic/64563/pfsense-auto-reboot-script-when-google-is-unreachable/9 | |
# | |
# Prep | |
# mkdir -p /var/log/pingtest | |
# |
This file contains 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
production: | |
options: { } | |
root: '/home/mysite/www/docroot' | |
uri: 'mysite.example.com' | |
host: mysite.example.com | |
user: mysite | |
ssh: | |
options: '-p 22' # Change SSH Port | |
paths: | |
drush-script: /home/mysite/www/vendor/drush/drush/drush.php |
This file contains 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
{ | |
"name": "my-project", | |
"version": "1.0.0", | |
"description": "Simple SCSS complie with autoprefix and minify", | |
"scripts": { | |
"build": "webpack" | |
}, | |
"devDependencies": { | |
"autoprefixer": "^9.0.0", | |
"breakpoint-sass": "^2.7.1", |
This file contains 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
# Disable httpauth set previously (at a higher, less specific level) | |
Satisfy Any | |
Order Allow,Deny | |
Allow from all |
This file contains 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 | |
namespace Drupal\my_module\Form; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
/** | |
* Class TestAjaxFormSelect. | |
*/ | |
class MyForm extends FormBase { |
This file contains 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 | |
namespace Drupal\my_module\Form; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
/** | |
* Class TestAjaxFormSelect. | |
*/ |
This file contains 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
# Sync a D8 database and enable dev modules. | |
# Usage: sync_d8 [site folder] [site alias] [alias env to get db from] | |
# Example: sync_d8 boral boral dev | |
function sync_d8() { | |
local site="$1" | |
local alias="@$2" | |
local env="$3" | |
local site_dir=~/sites/"$site" | |
local backup_dir=~/sites/db_backups/"$site" |
This file contains 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 | |
/** | |
* Implements hook_form_alter(). | |
*/ | |
function MYMODULE_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) { | |
$view_names = array('my_view_name'); | |
$view = $form_state->getStorage('view'); | |
if ($form_id == 'views_exposed_form' && in_array($view['view']->id(), $view_names)) { | |
// Do some shilzzle. |