發表文章

[MAC] 刪除擾人的 .DS_Store

打開終端機 cd 到指定目錄 因為刪除指令對某些人來說可能有疑慮,所以先看一下整個結果再確定是否要刪除 $ find . -name ".DS_Store" -depth -exec echo ----{} \; 結果 ----./Library/.DS_Store ----./Library/Application Support/.DS_Store ----./Library/Application Support/com.trankynam.XtraFinder/.DS_Store ----./Library/Application Support/CoRD/.DS_Store ----./Library/Application Support/Developer/Shared/Xcode/.DS_Store ----./Library/Application Support/DEVONthink Pro 2/.DS_Store ----./Library/Application Support/Haroopad/Themes/.DS_Store 正式刪除 find . -name ".DS_Store" -depth -exec rm {} \; 有任何疑問歡迎留言 By 艾摩杰~

[ionic] cordovaPush GCM 推播 範例

安裝 PushPlugin cordova plugin add https://github.com/phonegap-build/PushPlugin.git app.js angular.module('app', ['ionic','ngCordova']) .run(function($ionicPlatform,$cordovaPush,$rootScope) {   $ionicPlatform.ready(function() {     // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard     // for form inputs)     if(window.cordova && window.cordova.plugins.Keyboard) {       cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);     }     if(window.StatusBar) {       // org.apache.cordova.statusbar required       StatusBar.styleDefault();     }       var androidConfig = {       "senderID": "XXXXXXXXXX",     };     $cordovaPush.register(androidConfig).then(function(result) {       //alert(result);     }, function(err) {   ...

[PHP] 透過php gd轉圖片以程式方式輸出並在程式中取得參數回傳

#php2img 輸出圖片程式 <?    $pa = $_REQUEST['q'];    $image = "1.jpg";    $img=GetImageSize($image);    switch($img[2]){       case 1:          $im=ImageCreateFromGIF($image);          break;       case 2:          $im=ImageCreateFromJPEG($image);          break;       case 3:          $im=ImageCreateFromPNG($image);          break;    }    $logo = "1.jpg";    $pic=GetImageSize($logo);    switch($pic[2]){       case 1:          $im_pic=ImageCreateFromGIF($logo);          break;       case 2:          $im_pic=ImageCreateFromJPEG($logo);          break;   ...

[Linux] 使用 XRDP 從 win7 遠端 Ubuntu 桌面

圖片
XRDP 可以讓 windows 不需要裝額外 client 就能遠端 Ubuntu 1. 終端機 安裝指令 # apt-get install xrdp 2. 設定 桌面分享 3. Windows 執行 遠端桌面 即可連線 有任何疑問歡迎留言 By 艾摩杰~

[HTML] X-UA-Compatible 設置IE相容模式

強制瀏覽器呈現為特定的版本的標準。它不支持IE7及以下: <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7"/> 如果用分號分開,它設置為不同版本的兼容級別,IE7、IE9。它允許不同層次的向後兼容性: <meta http-equiv="X-UA-Compatible" content="IE=7; IE-9"/> 只選擇其中一個選項: <meta http-equiv="X-UA-Compatible" content="IE=9"> <meta http-equiv="X-UA-Compatible" content="IE=8"/> <meta http-equiv="X-UA-Compatible" content="IE=7"> <meta http-equiv="X-UA-Compatible" content="IE=5"> 允許更容易的測試和維護。雖然通常比較有用的版本,這是使用模擬: <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"> 什麼版本IE 就用什麼版本的標準模式: <meta http-equiv="X-UA-Compatible" content="IE=edge"> 使用以下代碼強制IE 使用Chrome...