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 | |
# Configuration: | |
DRUPAL_ROOT=/home/langgo/demo/langgo | |
DRUPAL_DIR=$DRUPAL_ROOT/sites/langgo | |
DB_BACKUP_FILE="https://raw.github.com/gist/5f39454c80939a29d425/f2045d53d15d41f2f8cfbc8570dfdb243667fb76/test.sql" | |
DRUSH_MAKE_FILE="https://raw.github.com/gist/b84fd6235b58779398c5/3324cbb4faa4d3c39a3af6b26ea7cf418c9ab00f/test.make" | |
ROOT_USER_NAME="root" | |
ROOT_USER_PASS="root" | |
DB_NAME="langgo_db" |
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 | |
# Configuration: | |
PATH_CONFIG="$HOME/vietcoop" | |
FILE_ARG="$1" | |
#check file config | |
if [ ! -f "$PATH_CONFIG/$FILE_ARG" ] | |
then | |
echo -e "Not found file config at '$PATH_CONFIG/$FILE_ARG'" | |
exit |
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 | |
# Configuration: | |
PATH_CONFIG="$HOME/vietcoop" | |
FILE_ARG="$1" | |
#check file config | |
if [ ! -f "$PATH_CONFIG/$FILE_ARG" ] | |
then | |
echo -e "Not found file config at '$PATH_CONFIG/$FILE_ARG'" |
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
1.could not access PID file for nginx ... failed! | |
$ sudo fuser -k 80/tcp ; sudo /etc/init.d/nginx restart | |
drush scr | |
http://ac.buzzwoo.de/ | |
2.resulotion | |
cvt 1280 1024 | |
xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync |
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
Về dữ liệu | |
Database gồm | |
1.feedback | |
2.log | |
3.setting | |
4.subject | |
5.words | |
6.words_class | |
7.word_subject |
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
Bellow is the example for dynamically creating/deleting/modifying field-collection item for any node. | |
Suppose 'field_page_collection1' is the field collection for the 'page' content type having two text fields 'field_page_collection1_text1', 'field_page_collection1_text2'. | |
To attach or create field-collection item for node having node id 1. | |
<?php | |
$node = node_load(1); | |
$field_collection_item = entity_create('field_collection_item', array('field_name' => 'field_page_collection1')); // Create new field collection item. |
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 | |
// Lets just pretend your content type is "Event" with machine name "event" | |
$node = new stdClass(); | |
$node->type = 'event'; | |
node_object_prepare($node); | |
$node->title = "My event title"; | |
$node->language = LANGUAGE_NONE; |
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
** use service Recurring Billing of braintree | |
Here’s how we will do that: | |
Create a Plan | |
create Customer and Use the Customer ID to retrieve the credit card from the Vault | |
Subscribe the Customer to the Plan | |
Confirm the Customer subscription |
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
1. Download and enable commerce_shipping, commerce_shipping_ui, commerce_ups, physical, commerce_physical | |
2. |
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
# | |
# Apache/PHP/Drupal settings: | |
# | |
# Protect files and directories from prying eyes. | |
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$"> | |
Order allow,deny | |
</FilesMatch> | |
# Don't show directory listings for URLs which map to a directory. |
OlderNewer