Update Apache conf file each time after upgrading OS X

Here is a quick diff note for my local server’s setting:

❯ diff httpd.conf httpd.conf~previous                                                                              [14:16:32]
diff --git a/httpd.conf b/httpd.conf~previous
index 905e1d1..2e2ca82 100644
--- a/httpd.conf
+++ b/httpd.conf~previous
@@ -49,7 +49,7 @@ ServerRoot "/usr"
 # prevent Apache from glomming onto all bound IP addresses.
 #
 #Listen 12.34.56.78:80
-Listen 80
+Listen 8080

 #
 # Dynamic Shared Object (DSO) Support
@@ -210,16 +210,18 @@ ServerAdmin you@example.com
 # If your host doesn't have a registered DNS name, enter its IP address here.
 #
 #ServerName www.example.com:80
-ServerName 127.0.0.1:80
+ServerName 127.0.0.1:8080

 #
 # Deny access to the entirety of your server's filesystem. You must
 # explicitly permit access to web content directories in other
 #  blocks below.
 #
+# AllowOverride none
+# Require all denied
 
-    AllowOverride none
-    Require all denied
+    Order deny,allow
+    Allow from all
 

 #
@@ -409,6 +411,8 @@ LogLevel warn
     AddType application/x-compress .Z
     AddType application/x-gzip .gz .tgz

+    AddType application/x-httpd-php .php
+
     #
     # AddHandler allows you to map certain file extensions to "handlers":
     # actions unrelated to filetype. These can be either built into the server
@@ -508,10 +512,6 @@ Include /private/etc/apache2/extra/httpd-autoindex.conf
 # Various default settings
 #Include /private/etc/apache2/extra/httpd-default.conf

-# Various default settings
-Include /private/etc/apache2/users/username.conf
-
-
 # Configure mod_proxy_html to understand HTML4/XHTML1
 
 Include /private/etc/apache2/extra/proxy-html.conf
@@ -530,6 +530,7 @@ SSLRandomSeed connect builtin
 

 Include /private/etc/apache2/other/*.conf
+Include /private/etc/apache2/users/username.conf

 #
 # uncomment out the below to deal with user agents that deliberately
@@ -543,3 +544,10 @@ Include /private/etc/apache2/other/*.conf
 #RequestHeader unset DNT env=bad_DNT
 #

+Alias /phpmyadmin /usr/local/share/phpmyadmin
+  
+    Options Indexes FollowSymLinks MultiViews
+    AllowOverride All
+    Order allow,deny
+    Allow from all
+  

Advertisements

Enable local FTP for WordPress in Mac

You can enable the FTP server via:
sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
Then just provide the OSX user account in the WP update backend.
And disable it via:
sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist

Use uinames and uiblurbs instead of lorem ipsum

When develop a prototype or mock-up, you may want to put some fake text as the data. The most use of the text may be Lorem Ipsum. But they are so common and meaningless that user will ignore them in your design, according to The Other Reason why Lorem Ipsum is Bad for Designs.
I find other choices for your prototype these days, they are uinames and
uiblurbs. They are more readable and looks like the real data.

From TextMate to Sublime Text

I’m using TextMate for a long time. After watching the Perfect Workflow in Sublime Text 2 from Jeffrey Way. I try the Sublime Text for about a week, so far I get used to it. I think the first impressed feature of Sublime Text is the multiple selection. And tutsplus.com is a great place to learn new tool and skills via video or ebook.

Some notes of the learning:
command+ctrl+g Auto select all words
command+shift+l Edit multiple lines at onece
The command+d multiple selection is conflict with the system dictionary, to fix this change the Expand Selection to Word to ctrl+d in the Key Bindings – user:

[
	{ "keys": ["ctrl+d"], "command": "find_under_expand" }
]

You can map the caps lock key to ctrl on the Mac.

And here are the packages I’ll install after a new fresh installing of Sublime Text.

  • Package Control (Install and discover package from here)
  • AdvanceNewFile (Add new file more quickly)
  • SublimeLinter (Give hint if there is something wrong in your code)
  • alternative_autocompletion (A textmate like autocompletion)
  • Clipboard Manager (Access the clipboard history like TextMate)
  • Gist (Create or update gist more easily in github)
  • Nettuts+ Fetch (Fetch the remote file like jquery.min.js quickly)
  • LiveReload (Test the HTML/CSS/JS file locally)
  • Prefixr (CSS3 prefixr)
  • StringEncode (HTML encode special character)
  • Terminal (Open Terminal in current file or folder)
  • Theme – Soda
  • ZenCoding