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 | |
PROFILE="standard" | |
DB="d8" | |
UI=false | |
NO_DEV=false | |
OPTS=`getopt -o h --longoptions db:,profile:,ui,no-dev -- "$@"` | |
eval set -- "$OPTS" | |
while true; do |
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 | |
/** | |
* Constructs a new context definition object. | |
* | |
* @param array $values | |
* An associative array with the following keys: | |
* - value: The required data type. | |
* - required: (optional) Whether the context definition is required. | |
* - multiple: (optional) Whether the context definition is multivalue. |
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
function drupal-install() { | |
# Remove existing database | |
drush sql-drop -y; | |
# Remove existing install | |
sudo rm -rf sites/default; | |
# Restore the sites/default/default.settings.php file | |
sudo git checkout -- sites/default; | |
# Temporarily make the sites/default writable by anyone | |
sudo chmod -R 777 sites/default; | |
# Ensure the owner is the current user, not root user |
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 | |
function pass_by_pointer($obj = NULL) { | |
$obj->value = 5; | |
} | |
function pass_by_reference(&$obj = NULL) { | |
$obj->value = 4; | |
} |
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
// Sass | |
$selectors: {foo, bar, baz}; | |
foreach $selectors as $selector { | |
.#{$selector} { background-image: url("../images/#{$selector}/background.png"); } | |
} | |
// CSS | |
.foo { | |
background-image: url("../images/foo/background.png"); | |
} |
NewerOlder