2015/09/25

[Laravel] Gulp TDD - 出現 PHPUnit Permission Denied 的解決方法

今天小試一下 Laravel 的 php unit testing

基本跑 phpunit 成功沒問題



變更 gulpfile.js -- 使用 mix.phpUnit();

執行 gulp tdd -- 卻出現 ./vendor/bin/phpunit: Permission denied

2015/09/14

[VS2015] 安裝 TypeScript 後造成 JavaScript Intellisense 失效的解決方法

最近在 Visual Studio 2015 更新 TypeScript 後, 突然 JavaScript 的 Intellisense 失效了! 沒有 color highlight 也沒有 code hint... 怎麼會這樣~~~

僅 .ts 的檔案都還可以用... 但是...還是有些 js code 寫在 razor 頁面上呀....

原本想說跟之前 razor 語法失效類似, 執行 ./devenv.exe /resetuserdata 還是不行

最終爬文找到方法, 只要重裝 Universal Windows App Development Tools

參考資料:
http://stackoverflow.com/questions/32000562/vs-2015-no-highlighting-and-intellisense-in-js-files

重裝步驟:

控制台 -> 解除安裝或變更程式 -> 找到 Visual Studio 2015

選擇 "變更", 會開啟 VS 的介面, 選擇 "變更"

如果原先有勾 Universal Windows App Development Tools, 先勾消, 再重新勾選
然後執行 "更新" 就會把 JavaScript 的支援加回來了


最後再到 Program File 的 VS IDE

執行下列兩行執令, 就完成囉!!!

./devenv.exe /updateconfiguration
./devenv.exe /clearcache

呼~~ 已經不習慣沒有 intellisense 的世界, 雖然 code 都可執行, 就是不能少那種感覺!!


2015/09/05

[Vagrant] 在 Windows 10 及 Mac 安裝 Homestead 步驟流程

安裝 Vagrant 輕便虛擬機 Homestead


安裝步驟:

必要的軟體 (在 Windows 或 Mac 皆需先安裝)

1. Git (http://git-scm.com/)
2. VirtualBox (https://www.virtualbox.org/wiki/Downloads)
3. Vagrant (https://www.vagrantup.com/)

4. 加入 laravel/homestead

vagrant box add laravel/homestead

5. 下載 vagrant homestead 環境設定

git clone https://github.com/laravel/homestead.git Homestead

2015/08/26

[Git] 解決 Git - unable to determine absolute path of git directory

今天第一次在 USB 操作遠端 Git 版控, 出現:

unable to determine absolute path of git directory

解決方法: 在 PowerShell 輸入指令

Stop-Process -processname ssh-agent*

git pull

即可正確執行

Reference:
http://stackoverflow.com/questions/11539076/git-unable-to-determine-absolute-path-of-git-directory

2015/07/27

[PHP] 處理 magic_quotes_gpc

PHP 5.4 版已預設 off, 但仍有主機商把它開啟

如果 get_magic_quotes_gpc() 回傳為 1 時
可以用 stripslashes 來處理字串

http://php.net/manual/en/function.get-magic-quotes-gpc.php

2015/07/17

[Git] 移除右鍵選單的 Git 指令選項

Git 在 Windows 系統下預設安裝的右鍵選單指令, 說實在的真的很少用, 今天決定把它移掉

步驟很簡單:


1. 開啟 cmd.exe 命令提示字元



2. 切換到 Git 安裝目錄的 git-cheetah/ 輸入以下指令

64-bit

cd "C:\Program Files\Git\git-cheetah"
regsvr32 /u git_shell_ext64.dll
32-bit

cd "C:\Program Files (x86)\Git\git-cheetah"
regsvr32 /u git_shell_ext.dll

參考: How do I remove msysgit's right click menu options?

2015/07/10

Access Database Engine 2010: 解決安裝 64 及 32 位元驅動衝突

在 Server 端通常不會安裝 Office 套件,但是又會應用程式做讀寫資料動作

Access Database Engine 2010 解套不用在伺服器端安裝大怪獸



之前遇到一個問題,在 64 位元的 Server 上已先安裝 64 位元的 Engine.

執行程式仍出現錯誤訊息

'Microsoft.ACE.OLEDB.12.0' 提供者並未登錄於本機電腦上。

我想應該 32 位元也需要裝上

結果事情居然沒想像中簡單,安裝按下一步就好了...


沒辦法直接安裝下,只好用下指令方式安裝



只要在命令提示列打上以下指令就可以囉~

AccessDatabaseEngine.exe /passive