原创 Git查看用戶名郵箱及重新設置

查看用戶名和郵箱地址 git config user.name git config user.email 修改用戶名和郵箱地址 git config --global user.name "username" git co

原创 Git查看遠程倉庫地址

git remote -v

原创 Git查看用戶名密碼及重新設置

查看用戶名和郵箱地址 git config user.name git config user.email 修改用戶名和郵箱地址 git config --global user.name "username" git conf

原创 mac homebrew禁止自動更新

使用mac自帶的終端 sudo vim ~/.base_profile export HOMEBREW_NO_AUTO_UPDATE=true 使用zsh sudo vim ~/.zshrc # 添加 export HO

原创 mac homebrew安裝php7.2

終端中輸入 brew search php brew install [email protected] brew link [email protected] brew link 出現warning執行(使用zsh的可將bash_profile改爲zshrc)

原创 MySQL查看配置文件my.ini或my.conf路徑

查看配置文件my.ini或my.conf路徑 select @@basedir; 查看文件存儲路徑 select @@datadir;

原创 git創建遠程分支_拉取遠程分支

新建一個本地分支: git checkout -b newBranch 新建的本地分支push到遠程服務器,遠程分支名xxx(可隨意取名) git push origin newBranch:xxx 查看遠程分支 git bran

原创 MySQL windows免安裝版本配置環境

添加bin目錄至環境變量中 執行mysqld -nt remove 執行mysqld --initialize --console 注意!執行輸出結果裏面有一段: [Note] [MY-010454] [Server] A te

原创 java -jar啓動時指定jvm時區

java -jar -Duser.timezone=GMT+08 xxx.jar

原创 MySQL server has gone away

原因一: MySQL服務宕了 查看mysql的運行時長: show global status like 'uptime'; 輸出: +---------------+---------+ | Variable_name | Val

原创 ThinkPHP5.0設置數據庫長連接

在application目錄下的database.php文件中將parma字段修改爲: // 數據庫連接參數 'params' => [ \PDO::ATTR_PERSISTENT => true,

原创 PHP json_encode格式化下標不爲0開始的數組會轉爲對象

$arr = array('a' , 'b', 'c'); json_encode($arr); 輸出: ["a","b","c"] $arr = array('1' => 'a' , '2' => 'b', '3' => 'c')

原创 PHP判斷函數,類,方法,屬性是否存在

php 判斷類裏面的某個屬性是否已經定義 bool property_exists ( mixed $class , string $property )檢查類的屬性是否存在 $directory=new Directory; i

原创 Windows使用RunHiddenConsole一鍵啓動nginx,php-cgi服務

新建start.bat 其中php_home,nginx_home是php和nginx安裝的路徑 D:/dev/RunHiddenConsole.exe 不是windows系統自帶,需下載並放置指定位置 @echo off set p

原创 PHP composer 設置代理

composer config -g repo.packagist composer https://packagist.composer-proxy.org composer config -g repo.packagist com