»

JavaScript Authoring Workflow of Now

Coding — Tags: , — Posted by Starck on August 25, 2013


JavaScript Authoring Workflow with Google Chrome

Chrome Workspace

To enable the Experiments tab of the Settings pane you need to navigate to about:flags and scroll down to the Experimental Developer Tools experiments flag. Enable it then restart the browser.

experiments-flag

A Solution for Cross Browser Testing

Design — Tags: , — Posted by Starck on August 25, 2013


Cross-browser-testing


It’s always a disturbing issue for testing IE browser between different versions, but I found a good solution from Microsoft:

Download IE VMs

Install Mod-FastCGI and PHP5-FPM on Ubuntu

Log — Tags: , , , , — Posted by Starck on August 22, 2013

Installation

Configuration

edit /etc/apache2/mods-enabled/fastcgi.conf:

Restart Apache2 and PHP5-FPM

— Updated 2014-01-09 (Ubuntu 13.10)–

mkdir /var/www/cgi-bin

touch /var/www/cgi-bin/php5.fcgi

chown -R www-data:www-data /var/www/cgi-bin

edit /etc/apache2/mods-enabled/fastcgi.conf:

Virtual host setting example :

References

Continue Reading

Nginx with Apache + FastCGI + PHP-FPM

Print and Bound Books

Design — Posted by Starck on August 22, 2013

etsy on livestream.com. Broadcast Live Free

Apigen – PHP API Document generator

Log — Tags: , — Posted by Starck on August 20, 2013


APIGEN LOGO

Usage:

If u got a problem about memory limit, just give it memory_limit parameter:

php -d memory_limit=800M apigen.php

Craft Example:

CSS Preloading

Log — Posted by Starck on August 1, 2013

CSS preloading example:

css preloading

Uninstall Open Directory Service on MacOS

Log — Posted by Starck on July 15, 2013


In terminal:

sudo slapconfig -destroyldapserver

Building Your Own Mail Server

Log — Tags: , — Posted by Starck on July 5, 2013


Requirments:


Installation

主要參考 Linode Library 的這篇教學

Postfix Settings

/etc/postfix/main.cf

/etc/postfix/mysql-virtual-mailbox-domains.cf:

/etc/postfix/mysql-virtual-mailbox-maps.cf:

/etc/postfix/mysql-virtual-alias-maps.cf:

測試:


Dovecot Settings

In this section, you’ll configure Dovecot to:

  • Set the IMAP, POP3, and LMTP protocols
  • Define the mail location
  • Use MySQL for username/password lookups for authentication
  • Configure needed sockets for authentication and LMTP
  • Require SSL encryption

You’ll modify a total of 7 Dovecot configuration files. Here’s the list:

  • /etc/dovecot/dovecot.conf: Dovecot’s main configuration file
  • /etc/dovecot/conf.d/10-mail.conf: Deals with the server’s file system
  • /etc/dovecot/conf.d/10-auth.conf: Defines how user authentication is handled
  • /etc/dovecot/conf.d/auth-sql.conf.ext: New authentication file for SQL-type authentication
  • /etc/dovecot/dovecot-sql.conf.ext: An included authentication file with the MySQL connection parameters
  • /etc/dovecot/conf.d/10-master.conf: Where sockets are configured
  • /etc/dovecot/conf.d/10-ssl.conf: Where SSL-related parameters are specified


/etc/dovecot/dovecot-sql.conf.ext:

如果要開啟 pop3 110 port, /etc/dovecot/conf.d/10-master.conf:


PostfixAdmin permission issue (myself)

/etc/dovecot/conf.d/10-master.conf:


Reference

Correct the Issue of Category Display

Log — Posted by Starck on June 25, 2013


修正 index.php:

Guard is My Best Friend

Coding, Design — Tags: — Posted by Starck on June 24, 2013


Guardfile 語法說明


  • guard :<plugin> : 使用 plugin
  • group :<group name> … end : 定義一個 task 分類區塊
  • %w[] : Ruby 宣告 Array 的方式, 用空白區分
  • :key => value : 宣告 Hashes 的 key/value
  • %r{} : Regexen 正規表達式, 可到 rubular 測試

Ruby語法參考, Guard語法參考

Group

example:


Plugins


CoffeeScript

guard-coffeescript

編譯 CoffeeScript

  • input : .coffee 路徑
  • output : .javascript 輸出路徑

example:


Concat

guard-concat

合併檔案

  • type : 檔案類型 (副檔名), ex: css, js
  • files : 哪些檔案要被合併, 用 Array 的方式定義
  • input_dir : 來源路徑
  • output : 合併後的檔案 (去除.副檔名)

example:


Livereload

guard-livereload

  • Blocks/Closures
  • watch : 偵測什麼的檔案變化, 可以用 %r 正規表達式

example:

可用參數:

example:


Minify

example:


PHP Unit Testing



參考完整 Guardfile 範例

Laravel-Guard Example:

My Laravel Example :

« Previous PageNext Page »
(c) 2024 Starck Lin | powered by WordPress