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 | |
define('LOGFILE', '/tmp/callback.log'); | |
if ($_SERVER['REQUEST_METHOD'] == 'GET') { | |
if (file_exists(LOGFILE)) { | |
print file_get_contents(LOGFILE); | |
} | |
else { | |
print 'Log file does not exist.'; |
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 | |
# Written in bash | |
# echo $SHELL | |
# change these values | |
APIKEY='8AAABBBCCC5' | |
PROJECTID='111222' | |
nid=`curl -sS --header "x-api-key: $APIKEY" --request POST https://backtrac.io/api/project/$PROJECTID/snapshot | sed 's/.*\"nid\":\"\([^\"]*\).*/\1/'` |
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 | |
/** | |
* Enable Google Analytics module. | |
*/ | |
function openy_update_8011() { | |
// Enable module. | |
\Drupal::service('module_installer')->install(['google_analytics']); | |
} |
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
# Lamp + PHP CS + Drush | |
image: sharpe/drupal:latest | |
pipelines: | |
branches: | |
8.x-1.x: | |
- step: | |
script: | |
#start mysql and create drupal db | |
- service mysql start |
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 | |
/** | |
* @file | |
* Contains \OpenEDUSubContext. | |
*/ | |
use Behat\Behat\Hook\Scope\BeforeScenarioScope; | |
use Drupal\DrupalExtension\Context\DrupalSubContextBase; | |
use Behat\Behat\Context\SnippetAcceptingContext; |
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
Command+E recent files | |
Ctrl+T refactor this: rename, variable, move method, interface | |
Command+N create constructor, getters, setters | |
Option+Enter initialize variable constructor | |
Shift+Shift search everywhere | |
Command+Up browse in current file’s folder | |
Command+Option+O search symbol | |
Command+, Settings | |
Control+G multiple cursors of same word | |
Control+V, Control+H windows splits (manually added) |
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 | |
TOKEN=`curl -sS -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "_username=ENCODEDEMAIL%40gmail.com&_password=ENCODEDPASSWORD" https://diffy.website/api/login_check | grep -o "token\":.*\"}" | sed "s/token\":\"//g" | sed "s/\"}//g"` | |
if [ -z "$TOKEN" ] | |
then | |
echo "Problem authenticating." | |
exit 1 | |
fi |
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
"patches": { | |
"drupal/core": { | |
"Fix styling of Umami for layout builder": "https://www.drupal.org/files/issues/2019-04-24/ootb-layout-builder-buttons-checkbox-3044366-38.patch" | |
} | |
} |
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
hooks: | |
# The deploy hook runs after your application has been deployed and started. | |
deploy: | | |
cd web | |
drush si demo_umami -y --account-pass=nKraDzZq8ZUq747Bn9PaXAB83 --account-mail="[email protected]" | |
drush cron | |
drush status > sites/default/files/drush-status.txt | |
php ../scripts/diffy-visual-testing.php |
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 | |
namespace Drupal\Tests\mymodule_core\Unit; | |
use CommerceGuys\Addressing\AddressFormat\AddressFormatRepository; | |
use Drupal\Core\Config\FileStorage; | |
use Drupal\Core\Database\Database; | |
use Drupal\Core\DrupalKernel; | |
use Drupal\Core\Installer\Form\SelectProfileForm; | |
use Drupal\Core\Site\Settings; |