熱門文章

2016年12月27日 星期二

2016年12月3日 星期六

Mac OSX 安裝/更改mysql password

OS X

原本在brew 安裝了mysql 但是忘記了
又去官網下載了mysql.dmg
這邊給了一個臨時的pw






command line 使用
➜  tmp git:(master) mysql -u root -p             
Enter password: 


輸入臨時pw

然後再更改

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> UPDATE mysql.user SET Password=PASSWORD('root')
    -> WHERE User='root';
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> SET PASSWORD = PASSWORD('root');

Query OK, 0 rows affected, 1 warning (0.04 sec)


pw就更新完畢了


http://stackoverflow.com/questions/33467337/reset-mysql-root-password-using-alter-user-statement-after-install-on-mac


http://stackoverflow.com/questions/4359131/brew-install-mysql-on-mac-os

mysql

Setup Ruby On Rails onMac OS X 10.10 Yosemite

2016年11月27日 星期日

[WordPress開發流程大公開!]本機開發再完整備份上線(Mac,Win)

WordPress是一個以PHPMySQL為平台的自由開源的部落格軟體和內容管理系統content management system (CMS)WordPress具有外掛模組架構和模板系統。Alexa排行前100萬的網站中有超過16.7%的網站使用WordPress。到了20118月,約22%的新網站採用了WordPressWordPress是目前網際網路上最流行的部落格系統。
本地測試軟體:MAMP(意思是My Aoache MySQK PHP 的縮寫)



MAMP是一個整合工具讓你在幾秒之內安裝好伺服器環境,有免費版跟付費版。讓你不用碰到任何的程式碼、煩雜的設定即可以快速的建置網路伺服器環境,而且當你不需要時只要刪除MAMP資料夾不會影響電腦原本的設定 (i.e. MAMP does not modify any of the "normal" system).


使用步驟大致是

  1. 安裝MAMP
  2. 啟動MAMP
  3. 放置wordpress至根目錄
  4. 建立資料庫
  5. 設定wp-config
  6. 完成本機模式




安裝方法:基本上就是就是下一步下一步就完成了。如安裝過程有問題可以看看這裡


開啟: 大象圖示的MAMP 或MAMP(試用),不過以下為MAMP教學


MAMP架站整合軟體
雖然是英文版,但是操作簡單,現在先點左邊的齒輪(Preferences)
MAMP change ports
預設的Port為8888 & 8889,我們現在點擊最下面的"Set Web & MySQL to 80 & 3306"
將它改為80&3306,接著OK


MAMP start servers
接著我們點擊右邊的"Start Servers"啟動伺服器,啟動時圖示變為綠色
接著按中間的"Open WebStart page"
MAMP Welcome page


看到以上畫面代表成功一半了,接著點擊上排左邊數來第二個"My Website"將會開啟以下頁面

在這裡可以看到你的網站資料夾是在 /Applications/MAMP/htdocs 下面

這裡就是我們要放wordpress的地方了(網站根目錄)
MAMP 網站根目錄
上圖可以看到我已經放了一些wordpress在上面了
若您是直接解壓縮在這裡,你的wp 網址會是 http://localhost
像我這樣則是 http://localhost/wordpress


接著,我們回到MAMP 歡迎畫面點擊上方左邊數來第四個" Tool >phpMyAdmin " 來建立我們的資料庫
phpmyadmin 新增資料庫

此範例我建立了test 資料庫


我們已經上傳了wordpress並且建立好資料庫,現在就瀏覽器開啟Wordpress所在位置
(此範例我放在http://localhost/ww)

衝吧! 設定我們的資料庫
在MAMP 歡迎頁面(http://localhost/MAMP/?language=English)的MySQL部分我們可以找到資料庫使用者名稱密碼均為"root" ,資料庫位址 就不須更動,如下圖填寫即可。






順利的在本機安裝好wordpress ,方便測試修改。
下一步驟,就是要教大家怎麼備份整個wordpress 以及還原或者搬運到其他host

前兩天建立的網路商店範例 供您參考 http://fujifilm.lionfree.net

第二部分-複製到host
如果還沒有買空間的話可以試試,免費Lionfree中文host教學

SaveSave
SaveSave

2016年11月26日 星期六

[WP]攝影作品主題-免費提供給你使用


wordpress免費攝影主題 fullscreen theme

Fullscreen theme 

一看到首頁就可以感受得到,用滿版的作品集來呈現。每張圖片都可以連結到該文章裡,可以很迅速地看到該系列作品。很棒的設計,不需要過多的文字去敘述。
首頁的文章是選擇某一個分類來做呈現,會直接取該文章的特色圖片裁切。文章是一欄式的設計。

Fullscreen is a free one-column photography and multimedia WordPress theme that provides visual artists a unique way of presenting their latest work using a minimalist side-scrolling homepage. Related


此主題有提供demo檔案可以匯入,套用此主題必須去修改縮圖的大小為200x200,更多說明詳見網站


2016年11月25日 星期五

[SEO]Google search console



 搜尋引擎最佳化入門指南 官方完整教學電子書

Google Search Console

點擊右上角新增內容以增加網站,可以增加含www.test.com 和 test.com 裸網域

新增您網站的所有版本
請務必新增「www」和「非 www」兩種版本的網站。此外,如果您使用 HTTPS 通訊協定,也請新增相關版本。





下載html檔案
利用ftp上傳到有index的那個資料夾
以openshift的wordpress為例是在
/var/lib/openshift/*********/app-root/data/current


點擊步驟三,會出現以下畫面,代表成功在點擊認證





當以上步驟完成時,會收到提示訊息如下,教你如何增加搜尋排名

Google 系統顯示,您最近已在 Search Console 中驗證自己的網站 (如果您是透過 Blogger 或 Google 協作平台建立網站,系統會自動完成驗證程序)。 為了協助您善用這項免費服務,有效提高網站在 Google 搜尋結果的排名,我們提供了一些實用提示讓您參考。

立即設定您的 Search Console 帳戶:

1
新增您網站的所有版本
請務必新增「www」和「非 www」兩種版本的網站。此外,如果您使用 HTTPS 通訊協定,也請新增相關版本。
2
選取偏好版本
選擇網站在 Google 搜尋中顯示時是否要加上「www」。
3
選擇目標國家/地區
如果網站主要是鎖定特定國家/地區的使用者,您可以設定地理區域偏好設定。
4
與同事共用存取權
如果您希望讓其他使用者存取您的報告,可以新增其他權限類型。
5
提交 Sitemap 檔案
這有助 Google 瞭解該如何檢索您的網站。

2016年11月17日 星期四

[html]快速產生範例圖檔-placehold it




只要在 http://placehold.it 後面加上想要的圖片大小 即可以產生向右邊那樣的灰色樣圖
方便你再調整網站版面時快速去看到效果

2016年11月16日 星期三

[Docker]Docker — 从入门到实践

Docker — 从入门到实践

0.7.3
Docker 是个划时代的开源项目,它彻底释放了虚拟化的威力,极大提高了应用的运行效率,降低了云计算资源供应的成本,同时让应用的部署、测试和分发都变得前所未有的高效和轻松!
无论是应用开发者,运维人员,还是云计算从业人员,都有必要认识和掌握 Docker,以在有限的时间内做更多有意义的事。
本书既适用于具备基础 Linux 知识的 Docker 初学者,也希望可供理解原理和实现的高级用户参考。同时,书中给出的实践案例,可供在进行实际部署时借鉴。前六章为基础内容,供用户理解 Docker 的基本概念和操作;7 ~ 9 章介绍一些高级操作;第 10 章给出典型的应用场景和实践案例;11 ~ 13 章介绍关于 Docker 实现的相关细节技术。后续章节则分别介绍一些相关的热门开源项目。
在线阅读:GitBook 或 Github

[Rails]Rails 5 开发进阶 -GitBooks



Rails 5 开发进阶

本书主要包括两部分:Rails 源码剖析和 Rails 使用指南。Rails 是一个 Web 开发框架,也是一个工具。"工欲善其事必先利其器",想要更好的使用 Rails 这个工具,清楚其背后的魔法,阅读源代码是必备功课。
本书尽量做到系统、全面,从源码出发,会讲解到原理。本书大部分内容为原创,少数内容为整理网上资料,鉴于参考资料太多,恕我不能一一列举来源。

本书适合什么样的读者?

  • 想要更好的使用 Rails
  • 准备阅读 Rails 的源代码
  • 想知道 Rails 的整体架构
  • 想清楚 Rails 背后的魔法

本书包含了哪些内容?

  • 一些文档里找不到的方法
  • 每个模块的关键所在
  • 源码阅读路线图

本书不讲哪些内容?

  • 安装、部署
  • 奇技淫巧
  • Ruby 语法、Rails 入门
  • 和具体业务相关的问题或功能
  • 非常具体、底层的代码实现

本书目的

  • 让使用其它语言、框架的技术人员,能看懂是什么
  • 让已经入门的 Rails 使用人员,知道更多原理,能看懂怎么用

联系我

邮箱:leekelby@gmail.com

2016年11月15日 星期二

[WP]Free themes

https://themeisle.com/

ShopIsle
v2.2.0  View Changelog
DocumentationDownload
Amadeus
DocumentationDownload
Parallax One
v2.1.1  View Changelog
DocumentationDownload
Flat
v1.7.6  View Changelog
DocumentationDownload
Zerif Lite
v2.0.4  View Changelog
DocumentationDownload
Reviewzine
v1.0.1  View Changelog
DocumentationDownload
Rhea
v1.0.1  View Changelog
DocumentationDownload
Clarina
DocumentationDownload
Hestia
v1.0.6  View Changelog
DocumentationDownload
Azera Shop Luxury
v1.0.3  View Changelog
DocumentationDownload
Shop Isle Companion
v1.0.3  View Changelog
DocumentationDownload
TheMotion Lite
v1.1.7  View Changelog
DocumentationDownload
LawyeriaX Lite
v1.0.9  View Changelog
DocumentationDownload
Naturelle
DocumentationDownload
Zillah
v1.0.12  View Changelog
DocumentationDownload
Adblock Notify Lite
v2.0.9  View Changelog
DocumentationDownload
FEEDZY RSS Feeds
DocumentationDownload
Intergeo – Google Maps Plugin Lite
v1.1.6  View Changelog
DocumentationDownload
IsleMag
v1.0.15  View Changelog
DocumentationDownload
FlyMag
DocumentationDownload
Oblique
DocumentationDownload
Azera Shop
v1.0.18  View Changelog
DocumentationDownload
Llorix One Lite
v0.1.22  View Changelog
DocumentationDownload
ResponsiveBoat
v1.1.4  View Changelog
DocumentationDownload
ZBlackbeard
DocumentationDownload
Visualizer: Charts and Graphs Lite
v1.7.1  View Changelog
DocumentationDownload
Pirate Forms
v1.0.18  View Changelog
DocumentationDownload
WPPR – Related Reviews
v1.2.1  View Changelog
DocumentationDownload
Zifer Child
DocumentationDownload
Custom Login Customizer
v1.0.8  View Changelog
DocumentationDownload
RokoPhoto Lite
v1.1.4  View Changelog
DocumentationDownload
Denta Theme Lite
DocumentationDownload
Mooveit Lite
v1.0.8  View Changelog
DocumentationDownload
Medica Lite
v1.2.11  View Changelog
DocumentationDownload
BookRev Lite
v1.7.3  View Changelog
DocumentationDownload
WP Product Review Lite
v2.9.6  View Changelog
DocumentationDownload
Plumbelt Lite
v1.2.9  View Changelog
DocumentationDownload
Lawyeria Lite
v1.1.6  View Changelog
DocumentationDownload
CW Business lite
v1.3.7  View Changelog
DocumentationDownload
Constructzine Lite
v1.3.9  View Changelog
DocumentationDownload
Music Band Lite
DocumentationDownload
Foliogine Lite
v1.5.5  View Changelog
DocumentationDownload
Premium Code Lite
v1.1.3  View Changelog
DocumentationDownload
CWP Youit
v1.2.2  View Changelog
DocumentationDownload
Caresland Lite
v1.6.1  View Changelog
DocumentationDownload
Metro CreativeX
v1.3.8  View Changelog
DocumentationDownload
CW Magazine
v1.1.8  View Changelog
DocumentationDownload
CWP Robi
DocumentationDownload
VertiMagazine
v1.2.2  View Changelog
DocumentationDownload
MiniMag
v1.1.2  View Changelog
DocumentationDownload
CreativeMag
DocumentationDownload
MiniMagazine
v1.1.6  View Changelog
DocumentationDownload
MegaResponsive Lite
v1.1.5  View Changelog
DocumentationDownload