1. 程式人生 > >NOTES 2018-10-17

NOTES 2018-10-17

http://codekarate.com/daily-dose-of-drupal
有很多drupal模組的介紹

git clean -df

//快速把資料表sql檔案插入資料庫並突破phpmyadmin的大小限制
source C:\Users\qqin\Downloads\devportal-without-wincache-2018-1-22.sql

fastCGI/PHH-FPM回答非常精彩
https://segmentfault.com/q/1010000000256516

image captcha refresh issue/patch
https://www.drupal.org/files/issues/image_captcha_refresh-2608540-37.patch

//config和configfactory的區別
//意味著configfactory之後要再去get一個鍵值
function config($name) {
  return static::getContainer()->get('config.factory')->get($name);
}
function configFactory() {
  return static::getContainer()->get('config.factory');
}

//get和geteditable的區別
function getEditable($name) {
 return $this->doGet($name, FALSE);
 //這裡的false就是為了修改做鋪墊
}
public function get($name) {
  return $this->doGet($name);
}
immutable英 [ɪˈmjuːtəb(ə)l] 美 [ɪ(m)ˈmjudəb(ə)l]
adj.長期不變的;不可改變的

Drush --debug

it is essential to provide a default value for each argument!

//多站點下的drush cr
drush cr -l http://sdl.devportal

ALU專案git remote -v

[email protected]:aluinternet.git
使用者名稱@URL:名稱.格式

可以刪除掉一個remote
git remote remove <name>

I then tried with
export http_proxy=http://username:[email protected]_proxy:your_port
export https_proxy=https://username:[email protected]_proxy:your_port
export proxy without quotes

"drupal/wincachedrupal": "^1.11"

In eclipse, when tab show 4 spaces, how to modify:
General > Editors > Text Editors > Insert spaces for tabs (check it)
PHP > Code Style > Formatter > Tab policy (choose "spaces")
PHP > Code Style > Formatter > Indentation size (set to 4)

所有的git配置項
git config -l

Eclipse and Windows newlines
是在eclipse上的對git的配置,core.autocrlf = true
https://stackoverflow.com/questions/1886185/eclipse-and-windows-newlines

這樣的正則表示匹不匹配得到都可以
但肯定不會進入()子匹配系統
(?:\<p\>)?

D8中如何使用composer
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
composer config repositories.drupal composer https://packages.drupal.org/8
----Inside Composer (也許需要這一步)
export http_proxy=http://135.245.48.34:8000
composer require "drupal/entity_print 2.x" in the SITE DOCROOT

Eclipse:compared with---
HEAD is the version of the file that has already been committed.
The index is the version of the file that has been staged (added) in preparation for a commit, but not yet committed.

這句話在phpmyadmin裡面的sql裡面是可以執行
就算報錯也可以退出然後再登入密碼就有效了
SET PASSWORD FOR
[email protected]
=PASSWORD('root');
為什麼這個命令很奇怪
因為這個命令是正對整個mysql的?

在wamp環境中
phpmyadmin.conf.php是貌似無效的

drush entity-updates -l http://sdl.devportal


kint($form_state);
$form_state->set('account', $user);
kint($form_state);
列印之前, $storage['account']沒有
列印之後, 就有了這個值

FormBuilder.php line 495

file_managed not delete:
https://drupal.stackexchange.com/questions/160156/files-in-the-file-managed-table-with-status-of-0-not-deleting-on-cron