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
events: | |
post-db-import: | |
appserver: > | |
cd $LANDO_MOUNT | |
&& wp search-replace "//example.com" "//example.lndo.site" --all-tables | |
&& wp search-replace "//www.example.com" "//example.lndo.site" --all-tables |
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
services: | |
pma: | |
type: phpmyadmin | |
hosts: | |
- database | |
mailhog: | |
type: mailhog | |
hogfrom: | |
- appserver | |
portforward: true |
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
docker cp <dbfile.sql> <container>:/tmp/import.sql | |
docker exec -it <container> /bin/bash | |
mysql -u <user> -p <database name> < import.sql |
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 | |
$mailhog_name = getenv('MAILHOG_NAME'); | |
$mailhog_port = getenv('MAILHOG_PORT'); | |
if ($mailhog_name && $mailhog_port) { | |
$hostname = array_slice(explode('/', getenv('MAILHOG_NAME')), -1, 1)[0]; | |
$port = array_slice(explode(':', getenv('MAILHOG_PORT')), -1, 1)[0]; | |
$settings = craft()->systemSettings->getSettings('email'); | |
$settings['protocol'] = 'smtp'; | |
$settings['port'] = $port; | |
$settings['host'] = $hostname; |
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
.card-img-left { | |
border-bottom-left-radius: calc(.25rem - 1px); | |
border-top-left-radius: calc(.25rem - 1px); | |
float: left; | |
padding-right: 1em; | |
margin-bottom: -1.25em; | |
} |
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 Same\As\Class\Testing | |
{ | |
function drupal_valid_token($token = NULL) | |
{ | |
return ($token == "expected value); | |
} | |
class moduleNameTestSuite extendsDrupalWebTestCase |
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 | |
$screen = get_current_screen(); | |
add_filter('manage_' . $screen->id . '_columns', 'my_true_false_option'); | |
function my_true_false_option() { | |
return array("my_true_false_option" => __("My True/False Option", 'translation-context')); | |
} | |
?> | |
<table id="fake_column"> |
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
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf | |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
network={ | |
ssid="YOURSSID" | |
psk="YOURPASSWORD" | |
# Protocol type can be: RSN (for WP2) and WPA (for WPA1) |
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 : dump() | |
* Arguments: The data - array,hash(associative array),object | |
* The level - OPTIONAL | |
* Returns : The textual representation of the array. | |
* This function was inspired by the print_r function of PHP. | |
* This will accept some data as the argument and return a | |
* text that will be a more readable version of the | |
* array/hash/object that is given. | |
* Docs: http://www.openjs.com/scripts/others/dump_function_php_print_r.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
// get your view object | |
$view = views_get_view('map_point_xml_page'); | |
$view->init_display(); | |
$view->pre_execute(); | |
// execute the view sql | |
$view->execute(); | |
// this is where the data will go | |
$rows = array(); | |
// get the results |